From dccfbe611e62d06f81d54bd034ffc6a805eb452a Mon Sep 17 00:00:00 2001 From: Tom Janson Date: Tue, 20 Dec 2016 17:47:34 +0100 Subject: [PATCH] specify lib out dir in CMakeLists (in addition to setup.py override) --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 398e2b7..7564226 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,12 @@ function(stormpy_module NAME) pybind11_add_module(${NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_${NAME}.cpp" ${STORM_${NAME}_SOURCES}) target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/generated) target_link_libraries(${NAME} PRIVATE storm) + + # setup.py will override this (because pip may want a different install + # path), but also specifying it here has the advantage that invoking cmake + # manually uses the correct path if the default is used (i.e. the + # STORMPY_LIB_DIR hardcoded above) + set_target_properties(${NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${LIB_PATH}") endfunction(stormpy_module)