Commit 01fd875a authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

python package is built in cmake build tree

parent 65f0df46
Pipeline #45066 canceled with stage
......@@ -97,10 +97,10 @@ get_property(ALL_LINK_DIRS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY LINK_D
#####################################################################################
## Build the lib
include_directories(${PROJECT_SOURCE_DIR}/bfps/cpp)
include_directories(${PROJECT_SOURCE_DIR}/cpp)
file(GLOB_RECURSE cpp_for_lib ${PROJECT_SOURCE_DIR}/bfps/*.cpp)
file(GLOB_RECURSE hpp_for_lib ${PROJECT_SOURCE_DIR}/bfps/*.hpp)
file(GLOB_RECURSE cpp_for_lib ${PROJECT_SOURCE_DIR}/*.cpp)
file(GLOB_RECURSE hpp_for_lib ${PROJECT_SOURCE_DIR}/*.hpp)
LIST(APPEND source_files ${hpp_for_lib} ${cpp_for_lib})
add_library(bfps ${source_files})
......@@ -108,7 +108,7 @@ add_library(bfps ${source_files})
target_link_libraries(bfps ${BFPS_LIBS})
install(TARGETS bfps EXPORT BFPS_EXPORT DESTINATION lib/ )
install(DIRECTORY ${PROJECT_SOURCE_DIR}/bfps/cpp DESTINATION include/bfps/ FILES_MATCHING PATTERN "*.h*")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/cpp DESTINATION include/bfps/ FILES_MATCHING PATTERN "*.h*")
#####################################################################################
## Export the configuration
......@@ -122,5 +122,6 @@ install(EXPORT BFPS_EXPORT DESTINATION lib/)
#####################################################################################
## Install the python wrapper
install(CODE "execute_process(COMMAND python setup.py install --force --prefix=${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})")
file(COPY ${PROJECT_SOURCE_DIR}/bfps DESTINATION ${PROJECT_BINARY_DIR}/python/)
install(CODE "execute_process(COMMAND python ${PROJECT_SOURCE_DIR}/setup.py install --force --prefix=${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python/)")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment