GtsamCythonWrap.cmake update
- Update install directory so that the release tag is appended to the cython directory only rather than the specific subdirectories. - Update the target properties so that the .so files don't have the build type appended as a postfix.release/4.3a0
parent
bc16290e96
commit
4f5d13f328
|
@ -86,8 +86,13 @@ function(build_cythonized_cpp target cpp_file output_lib_we output_dir)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(link_flags "-undefined dynamic_lookup")
|
set(link_flags "-undefined dynamic_lookup")
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS "-w" LINK_FLAGS "${link_flags}"
|
set_target_properties(${target}
|
||||||
OUTPUT_NAME ${output_lib_we} PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${output_dir})
|
PROPERTIES COMPILE_FLAGS "-w"
|
||||||
|
LINK_FLAGS "${link_flags}"
|
||||||
|
OUTPUT_NAME ${output_lib_we}
|
||||||
|
PREFIX ""
|
||||||
|
${CMAKE_BUILD_TYPE_UPPER}_POSTFIX ""
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${output_dir})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Cythonize a pyx from the command line as described at
|
# Cythonize a pyx from the command line as described at
|
||||||
|
@ -163,7 +168,11 @@ function(install_cython_wrapped_library interface_header generated_files_path in
|
||||||
|
|
||||||
# NOTE: only installs .pxd and .pyx and binary files (not .cpp) - the trailing slash on the directory name
|
# NOTE: only installs .pxd and .pyx and binary files (not .cpp) - the trailing slash on the directory name
|
||||||
# here prevents creating the top-level module name directory in the destination.
|
# here prevents creating the top-level module name directory in the destination.
|
||||||
message(STATUS "Installing Cython Toolbox to ${install_path}") #${GTSAM_CYTHON_INSTALL_PATH}")
|
# Split up filename to strip trailing '/' in GTSAM_CYTHON_INSTALL_PATH/subdirectory if there is one
|
||||||
|
get_filename_component(location "${install_path}" PATH)
|
||||||
|
get_filename_component(name "${install_path}" NAME)
|
||||||
|
message(STATUS "Installing Cython Toolbox to ${location}${GTSAM_BUILD_TAG}/${name}") #${GTSAM_CYTHON_INSTALL_PATH}"
|
||||||
|
|
||||||
if(GTSAM_BUILD_TYPE_POSTFIXES)
|
if(GTSAM_BUILD_TYPE_POSTFIXES)
|
||||||
foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
|
foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
|
||||||
string(TOUPPER "${build_type}" build_type_upper)
|
string(TOUPPER "${build_type}" build_type_upper)
|
||||||
|
@ -172,10 +181,8 @@ function(install_cython_wrapped_library interface_header generated_files_path in
|
||||||
else()
|
else()
|
||||||
set(build_type_tag "${build_type}")
|
set(build_type_tag "${build_type}")
|
||||||
endif()
|
endif()
|
||||||
# Split up filename to strip trailing '/' in GTSAM_CYTHON_INSTALL_PATH if there is one
|
|
||||||
get_filename_component(location "${install_path}" PATH)
|
install(DIRECTORY "${generated_files_path}/" DESTINATION "${location}${build_type_tag}/${name}"
|
||||||
get_filename_component(name "${install_path}" NAME)
|
|
||||||
install(DIRECTORY "${generated_files_path}/" DESTINATION "${location}/${name}${build_type_tag}"
|
|
||||||
CONFIGURATIONS "${build_type}"
|
CONFIGURATIONS "${build_type}"
|
||||||
PATTERN "build" EXCLUDE
|
PATTERN "build" EXCLUDE
|
||||||
PATTERN "CMakeFiles" EXCLUDE
|
PATTERN "CMakeFiles" EXCLUDE
|
||||||
|
|
Loading…
Reference in New Issue