forked from mantidproject/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (31 loc) · 1.05 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Utilities for defining targets
include(QtTargetFunctions)
# Resource compiler for PyQt5
if((ENABLE_WORKBENCH OR BUILD_MANTIDQT) AND NOT PYRCC5_CMD)
# Newer versions of PyQt5 have a pyrcc_main python module, whereas older versions have a pyrcc5 executable. We prefer
# calling the python module.
execute_process(COMMAND ${Python_EXECUTABLE} -c "import PyQt5.pyrcc_main" RESULT_VARIABLE _status)
if(_status EQUAL 0)
set(PYRCC5_CMD
${Python_EXECUTABLE} -m PyQt5.pyrcc_main
CACHE STRING "Command line to use to run the PyQt5 resource compiler"
)
else()
find_file(PYRCC5_CMD "pyrcc5")
if(NOT PYRCC5_CMD)
message(FATAL_ERROR "Unable to find PyQt5 resource compiler. Tried PyQt5.pyrcc_main & pyrcc5")
endif()
endif()
endif()
# Include python helper functions
include(PythonPackageTargetFunctions)
# Qt-based targets
if(BUILD_MANTIDQT)
add_subdirectory(icons)
add_subdirectory(widgets)
add_subdirectory(python)
add_subdirectory(scientific_interfaces)
endif()
if(ENABLE_WORKBENCH)
add_subdirectory(applications)
endif()