You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
42 lines
1.2 KiB
find_package(PythonInterp REQUIRED)
|
|
find_package(PythonLibs REQUIRED)
|
|
|
|
set(STORMPY_OUTPUT_DIR "${PROJECT_BINARY_DIR}/stormpy")
|
|
set(STORMPY_SOURCE_DIR "${PROJECT_SOURCE_DIR}/stormpy")
|
|
|
|
if(STORM_HAVE_CLN)
|
|
set(STORMPY_USE_CLN 1)
|
|
else()
|
|
set(STORMPY_USE_CLN 0)
|
|
endif()
|
|
|
|
# Set configuration file
|
|
get_directory_property(STORMPY_INCLUDE_DIRS_PROP INCLUDE_DIRECTORIES)
|
|
foreach(arg ${STORMPY_INCLUDE_DIRS_PROP})
|
|
set(STORMPY_INCLUDE_DIRS "${STORMPY_INCLUDE_DIRS}${sep}${arg}")
|
|
set(sep ":")
|
|
endforeach()
|
|
set(STORMPY_COMPILE_ARGS ${CMAKE_CXX_FLAGS})
|
|
set(STORMPY_LIBRARY_DIRS "${PROJECT_BINARY_DIR}/src")
|
|
set(STORMPY_RPATH "${PROJECT_BINARY_DIR}/src")
|
|
configure_file (
|
|
"${PROJECT_SOURCE_DIR}/stormpy/setup.cfg.in"
|
|
"${PROJECT_SOURCE_DIR}/stormpy/setup.cfg"
|
|
)
|
|
|
|
# Add targets
|
|
add_custom_target(PythonBindingsBuild
|
|
COMMAND ${PYTHON_EXECUTABLE} setup.py build
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
DEPENDS storm
|
|
)
|
|
add_custom_target(PythonBindingsDevelop
|
|
COMMAND ${PYTHON_EXECUTABLE} setup.py develop
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
DEPENDS storm
|
|
)
|
|
add_custom_target(PythonBindingsInstall
|
|
COMMAND ${PYTHON_EXECUTABLE} setup.py install --user
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
DEPENDS storm
|
|
)
|