From 85dffc6a735c73159af3fc490ee74836f023e1b4 Mon Sep 17 00:00:00 2001 From: Louwrens van Dellen Date: Sat, 14 Sep 2024 21:03:38 +0200 Subject: [PATCH] add PIVY_Python_SITEARCH install destination --- CMakeLists.txt | 11 ++++++++++- interfaces/CMakeLists.txt | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 061416d..a968da0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,15 @@ endif() find_package(Python REQUIRED COMPONENTS Interpreter Development) +if (NOT PIVY_Python_SITEARCH) + SET(PIVY_Python_SITEARCH ${Python_SITEARCH}) +endif() + +if (Python_FOUND) + MESSAGE(STATUS "Python_FOUND: TRUE") + MESSAGE(STATUS "PIVY_Python_SITEARCH: ${PIVY_Python_SITEARCH}") +endif() + if (Coin_FOUND) MESSAGE(STATUS "COIN_FOUND: TRUE") MESSAGE(STATUS "COIN_INCLUDE_DIR: ${Coin_INCLUDE_DIR}") @@ -53,7 +62,7 @@ add_subdirectory(interfaces) install(DIRECTORY ${CMAKE_BINARY_DIR}/pivy - DESTINATION ${Python_SITEARCH} + DESTINATION ${PIVY_Python_SITEARCH} FILES_MATCHING PATTERN "*.py" PATTERN "*.so" diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index fbfd23e..0c36c2f 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -41,7 +41,7 @@ target_include_directories(coin ) target_link_libraries(coin PUBLIC Coin::Coin) -install(TARGETS coin DESTINATION ${Python_SITEARCH}/pivy) +install(TARGETS coin DESTINATION ${PIVY_Python_SITEARCH}/pivy) if (SoQt_FOUND) @@ -86,5 +86,5 @@ if (SoQt_FOUND) ) target_link_libraries(soqt PUBLIC SoQt::SoQt) - install(TARGETS soqt DESTINATION ${Python_SITEARCH}/pivy/gui) + install(TARGETS soqt DESTINATION ${PIVY_Python_SITEARCH}/pivy/gui) endif()