aboutsummaryrefslogtreecommitdiff
path: root/find-modules/FindWaylandScanner.cmake
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@kde.org>2014-11-07 12:26:48 +0000
committerAlex Merry <alex.merry@kde.org>2014-11-07 12:26:48 +0000
commit32c41706e06e96ab10b757ebe6337071db53fe43 (patch)
tree34787589382540628d66cf0529686b657ccd7c07 /find-modules/FindWaylandScanner.cmake
parent7e535b93cdbb7420d241c00cb9c0abf462ff59d8 (diff)
downloadextra-cmake-modules-32c41706e06e96ab10b757ebe6337071db53fe43.tar.gz
extra-cmake-modules-32c41706e06e96ab10b757ebe6337071db53fe43.tar.bz2
Do not skip searching for X11 and Wayland on Windows
While the search is unlikely to succeed on Windows, having different behaviour between the platforms (eg: find_package(Wayland REQUIRED) was not fatal on Windows, even though Wayland_FOUND would always be FALSE) is not ideal, and if someone did port them to Windows for some reason, the find modules should support that. If applications actually want different behaviour between platforms (like requiring a module on Unix, but not on Windows), they should implement that logic themselves (since they will have to deal with targets not being defined, etc, anyway). REVIEW: 120481
Diffstat (limited to 'find-modules/FindWaylandScanner.cmake')
-rw-r--r--find-modules/FindWaylandScanner.cmake37
1 files changed, 16 insertions, 21 deletions
diff --git a/find-modules/FindWaylandScanner.cmake b/find-modules/FindWaylandScanner.cmake
index 4cade50f..33c46f9b 100644
--- a/find-modules/FindWaylandScanner.cmake
+++ b/find-modules/FindWaylandScanner.cmake
@@ -2,7 +2,7 @@
# FindWaylandScanner
# ------------------
#
-# Try to find wayland-scanner on a Unix system.
+# Try to find wayland-scanner.
#
# If the wayland-scanner executable is not in your PATH, you can provide
# an alternative name or full path location with the ``WaylandScanner_EXECUTABLE``
@@ -79,29 +79,24 @@ include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
ecm_find_package_version_check(WaylandScanner)
-if(NOT WIN32)
- # Find wayland-scanner
- find_program(WaylandScanner_EXECUTABLE NAMES wayland-scanner)
+# Find wayland-scanner
+find_program(WaylandScanner_EXECUTABLE NAMES wayland-scanner)
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(WaylandScanner
- FOUND_VAR
- WaylandScanner_FOUND
- REQUIRED_VARS
- WaylandScanner_EXECUTABLE
- )
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WaylandScanner
+ FOUND_VAR
+ WaylandScanner_FOUND
+ REQUIRED_VARS
+ WaylandScanner_EXECUTABLE
+)
- mark_as_advanced(WaylandScanner_EXECUTABLE)
+mark_as_advanced(WaylandScanner_EXECUTABLE)
- if(NOT TARGET Wayland::Scanner AND WaylandScanner_FOUND)
- add_executable(Wayland::Scanner IMPORTED)
- set_target_properties(Wayland::Scanner PROPERTIES
- IMPORTED_LOCATION "${WaylandScanner_EXECUTABLE}"
- )
- endif()
-else()
- message(STATUS "Wayland is not available on Windows.")
- set(WaylandScanner_FOUND FALSE)
+if(NOT TARGET Wayland::Scanner AND WaylandScanner_FOUND)
+ add_executable(Wayland::Scanner IMPORTED)
+ set_target_properties(Wayland::Scanner PROPERTIES
+ IMPORTED_LOCATION "${WaylandScanner_EXECUTABLE}"
+ )
endif()
include(FeatureSummary)