Skip to content

Commit 3066a9a

Browse files
committed
Make the destination directory for the external configurable with the INSTALL_DIR variable, and use a more sensible default for that directory on Mac and Windows.
1 parent 644e7fa commit 3066a9a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ if(MSVC)
5353
set_property(TARGET faustgen_tilde_project APPEND_STRING PROPERTY LINK_FLAGS " /ignore:4099 ")
5454
endif()
5555

56+
## Installation directory. This is relative to CMAKE_INSTALL_PREFIX.
57+
## Default is lib/pd/extra/faustgen~ on Linux and other generic Unix-like
58+
## systems, or just faustgen~ on Mac and Windows.
59+
if(UNIX AND NOT APPLE)
60+
set(INSTALL_DIR "lib/pd/extra/faustgen~" CACHE STRING "Destination directory for the external")
61+
else()
62+
set(INSTALL_DIR "faustgen~" CACHE STRING "Destination directory for the external")
63+
endif()
64+
65+
message(STATUS "Installation goes to CMAKE_INSTALL_PREFIX/${INSTALL_DIR}")
66+
5667
file(GLOB lib_files ${PROJECT_SOURCE_DIR}/faust/libraries/*.lib ${PROJECT_SOURCE_DIR}/faust/libraries/old/*.lib)
57-
install(DIRECTORY external/ DESTINATION lib/pd/extra/faustgen~)
58-
install(FILES ${lib_files} DESTINATION lib/pd/extra/faustgen~/libs)
68+
install(DIRECTORY external/ DESTINATION ${INSTALL_DIR})
69+
install(FILES ${lib_files} DESTINATION ${INSTALL_DIR}/libs)

0 commit comments

Comments
 (0)