Skip to content

Commit

Permalink
add PIVY_Python_SITEARCH install destination
Browse files Browse the repository at this point in the history
  • Loading branch information
Louwrensth authored and looooo committed Sep 25, 2024
1 parent 233d871 commit 85dffc6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()

0 comments on commit 85dffc6

Please sign in to comment.