aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2017-02-16 12:52:40 +0100
committerAleix Pol <aleixpol@kde.org>2017-03-06 00:08:14 +0100
commit9d3abb5c88f92748788860f7126a1b51012a9798 (patch)
tree9b785002fa842b0590f4058b40c4108d16e6588c
parenta02c4d0152a7ac4876840e083351605fbcdf5c70 (diff)
downloadextra-cmake-modules-9d3abb5c88f92748788860f7126a1b51012a9798.tar.gz
extra-cmake-modules-9d3abb5c88f92748788860f7126a1b51012a9798.tar.bz2
Only register APPLE_* options if(APPLE)
Summary: Otherwise the cmake cache has noisy values. Test Plan: Recreated a project, it's not listed first thing when calling ccmake. Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D4630
-rw-r--r--kde-modules/KDECMakeSettings.cmake31
1 files changed, 16 insertions, 15 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake
index 06fa9407..620042a4 100644
--- a/kde-modules/KDECMakeSettings.cmake
+++ b/kde-modules/KDECMakeSettings.cmake
@@ -237,22 +237,23 @@ if(NOT KDE_SKIP_BUILD_SETTINGS)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
endif()
- # Disable detection of X11 and related package on OS X because when using
- # brew or macports, X11 can be installed and thus is detected.
- option(APPLE_FORCE_X11 "Force enable X11 related detection on OS X" OFF)
- option(APPLE_SUPPRESS_X11_WARNING "Suppress X11 and related technologies search disabling warning on OS X" OFF)
-
- if(APPLE AND NOT APPLE_FORCE_X11)
- if (NOT APPLE_SUPPRESS_X11_WARNING)
- message(WARNING "Searching for X11 and related technologies is disabled on Apple systems. Set APPLE_FORCE_X11 to ON to change this behaviour. Set APPLE_SUPPRESS_X11_WARNING to ON to hide this warning.")
- endif()
-
- set(CMAKE_DISABLE_FIND_PACKAGE_X11 true)
- set(CMAKE_DISABLE_FIND_PACKAGE_XCB true)
- set(CMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras true)
- endif()
+ if (APPLE)
+ # Disable detection of X11 and related package on OS X because when using
+ # brew or macports, X11 can be installed and thus is detected.
+ option(APPLE_FORCE_X11 "Force enable X11 related detection on OS X" OFF)
+ option(APPLE_SUPPRESS_X11_WARNING "Suppress X11 and related technologies search disabling warning on OS X" OFF)
+
+ if(NOT APPLE_FORCE_X11)
+ if (NOT APPLE_SUPPRESS_X11_WARNING)
+ message(WARNING "Searching for X11 and related technologies is disabled on Apple systems. Set APPLE_FORCE_X11 to ON to change this behaviour. Set APPLE_SUPPRESS_X11_WARNING to ON to hide this warning.")
+ endif()
+ set(CMAKE_DISABLE_FIND_PACKAGE_X11 true)
+ set(CMAKE_DISABLE_FIND_PACKAGE_XCB true)
+ set(CMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras true)
+ endif()
+ endif()
- option(KDE_SKIP_UNINSTALL_TARGET "Prevent an \"uninstall\" target from being generated." OFF)
+ option(KDE_SKIP_UNINSTALL_TARGET "Prevent an \"uninstall\" target from being generated." OFF)
if(NOT KDE_SKIP_UNINSTALL_TARGET)
include("${ECM_MODULE_DIR}/ECMUninstallTarget.cmake")
endif()