CMakeLists.txt

changeset 67
c34057d3c94e
parent 62
d4857a7aa5a1
--- a/CMakeLists.txt	Sun Nov 28 23:53:23 2021 +0200
+++ b/CMakeLists.txt	Mon Dec 06 00:29:47 2021 +0200
@@ -3,7 +3,7 @@
 cmake_policy (SET CMP0020 NEW)
 find_package (Qt5Widgets REQUIRED)
 find_package (Qt5Core REQUIRED)
-
+find_package (Python COMPONENTS Interpreter)
 include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
 
 set (ZCINEMA_LAUNCHER_SOURCES
@@ -77,7 +77,7 @@
 target_link_libraries (${PROJECT_NAME}-config ${PROJECT_NAME}-common)
 
 add_custom_target (make_hginfo
-	COMMAND python
+	    COMMAND ${Python_EXECUTABLE}
 		"${CMAKE_SOURCE_DIR}/updaterevision.py"
 		"${CMAKE_CURRENT_BINARY_DIR}/hginfo.h"
 	WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
@@ -88,8 +88,8 @@
 
 # With clang, we need to set -Wno-deprecated since Qt headers seem to use the register keyword
 # which clang doesn't seem to like.
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
 	set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
 endif()
 
-install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
\ No newline at end of file
+install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)

mercurial