diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cb25c7..869ad6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ add_subdirectory(resources/pybind11) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h) +message(STATUS "STORM-DIR: ${storm_DIR}") set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy" CACHE STRING "Sets the storm library dir") @@ -24,7 +25,7 @@ function(stormpy_module NAME) file(GLOB_RECURSE "STORM_${NAME}_SOURCES" "${CMAKE_CURRENT_SOURCE_DIR}/src/${NAME}/*.cpp") pybind11_add_module(${NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_${NAME}.cpp" ${STORM_${NAME}_SOURCES}) - + if(ARGC GREATER 2) # Additional libraries target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${ARGV3} ${CMAKE_CURRENT_BINARY_DIR}/src/generated) diff --git a/setup.py b/setup.py index a3e2363..c855010 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,10 @@ class CMakeBuild(build_ext): os.makedirs(build_temp_version) # Check cmake variable values - output = subprocess.check_output(['cmake', os.path.abspath("cmake")], cwd=build_temp_version) + cmake_args = [] + if self.storm_dir is not None: + cmake_args = ['-Dstorm_DIR=' + self.storm_dir] + output = subprocess.check_output(['cmake', os.path.abspath("cmake")] + cmake_args, cwd=build_temp_version) output = output.decode('ascii') match = re.search(r"STORM-DIR: (.*)", output) assert(match) @@ -69,7 +72,7 @@ class CMakeBuild(build_ext): print(extdir) cmake_args = ['-DSTORMPY_LIB_DIR=' + extdir, '-DPYTHON_EXECUTABLE=' + sys.executable] - + cfg = 'Release' # if self.debug else 'Release' build_args = ['--config', cfg]