mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
31 lines
1012 B
CMake
31 lines
1012 B
CMake
add_library(python
|
|
${CMAKE_SOURCE_DIR}/include/python/PythonInit.h
|
|
${CMAKE_SOURCE_DIR}/include/python/PythonProgram.h
|
|
${CMAKE_SOURCE_DIR}/include/python/PythonUtils.h
|
|
${CMAKE_SOURCE_DIR}/libsrc/python/PythonInit.cpp
|
|
${CMAKE_SOURCE_DIR}/libsrc/python/PythonProgram.cpp
|
|
)
|
|
|
|
if(NOT CMAKE_VERSION VERSION_LESS "3.12")
|
|
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
|
else()
|
|
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT)
|
|
endif()
|
|
|
|
target_link_libraries(python
|
|
effectengine
|
|
hyperion-utils
|
|
${Python3_LIBRARIES}
|
|
${PYTHON_LIBRARIES}
|
|
)
|
|
|
|
target_include_directories(python PUBLIC
|
|
${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..
|
|
${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..
|
|
)
|
|
|
|
target_compile_definitions(python PRIVATE
|
|
PYTHON_VERSION_MAJOR=$<$<BOOL:${Python3_FOUND}>:${Python3_VERSION_MAJOR}>$<$<BOOL:${PYTHONLIBS_FOUND}>:${PYTHON_VERSION_MAJOR}>
|
|
PYTHON_VERSION_MINOR=$<$<BOOL:${Python3_FOUND}>:${Python3_VERSION_MINOR}>$<$<BOOL:${PYTHONLIBS_FOUND}>:${PYTHON_VERSION_MINOR}>
|
|
)
|