2020-05-12 19:51:19 +02:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
|
|
|
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
|
|
|
else()
|
|
|
|
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
|
|
|
endif()
|
2013-11-24 18:53:20 +01:00
|
|
|
|
2015-01-21 12:57:28 +01:00
|
|
|
# Include the python directory. Also include the parent (which is for example /usr/include)
|
|
|
|
# which may be required when it is not includes by the (cross-) compiler by default.
|
2020-05-12 19:51:19 +02:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
|
|
|
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
|
|
|
else()
|
|
|
|
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
|
|
|
endif()
|
2013-11-24 18:53:20 +01:00
|
|
|
|
2013-11-24 16:10:48 +01:00
|
|
|
# Define the current source locations
|
|
|
|
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/effectengine)
|
|
|
|
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/effectengine)
|
|
|
|
|
2017-08-04 23:08:15 +02:00
|
|
|
FILE ( GLOB EffectEngineSOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" )
|
2016-09-13 11:51:16 +02:00
|
|
|
FILE ( GLOB effectFiles RELATIVE ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/effects/* )
|
2017-08-04 23:08:15 +02:00
|
|
|
|
2016-09-13 11:51:16 +02:00
|
|
|
SET ( HYPERION_EFFECTS_RES "")
|
|
|
|
FOREACH( f ${effectFiles} )
|
|
|
|
GET_FILENAME_COMPONENT(fname ${f} NAME)
|
|
|
|
SET(HYPERION_EFFECTS_RES "${HYPERION_EFFECTS_RES}\n\t\t<file alias=\"/effects/${fname}\">${f}</file>")
|
|
|
|
ENDFOREACH()
|
|
|
|
CONFIGURE_FILE(${CURRENT_SOURCE_DIR}/EffectEngine.qrc.in ${CMAKE_BINARY_DIR}/EffectEngine.qrc )
|
|
|
|
|
|
|
|
SET(EffectEngine_RESOURCES ${CMAKE_BINARY_DIR}/EffectEngine.qrc)
|
2013-12-11 21:58:59 +01:00
|
|
|
|
2013-11-24 16:10:48 +01:00
|
|
|
add_library(effectengine
|
2017-10-13 00:06:31 +02:00
|
|
|
${EffectEngine_RESOURCES}
|
2016-05-26 23:44:27 +02:00
|
|
|
${EffectEngineSOURCES}
|
2013-11-24 16:10:48 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(effectengine
|
2016-05-26 23:44:27 +02:00
|
|
|
hyperion
|
2018-12-27 23:11:32 +01:00
|
|
|
python
|
2021-11-16 18:12:56 +01:00
|
|
|
Qt${QT_VERSION_MAJOR}::Core
|
|
|
|
Qt${QT_VERSION_MAJOR}::Gui
|
2017-08-04 23:08:15 +02:00
|
|
|
)
|
2020-05-12 19:51:19 +02:00
|
|
|
|
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
|
|
|
target_link_libraries( effectengine ${Python3_LIBRARIES} )
|
|
|
|
else()
|
|
|
|
target_link_libraries( effectengine ${PYTHON_LIBRARIES} )
|
|
|
|
endif()
|