Skip to content

Commit

Permalink
Merge pull request #1076 from timkpaine/tkp/conda
Browse files Browse the repository at this point in the history
Apply patches from conda-forge
  • Loading branch information
alaindargelas authored Jun 20, 2024
2 parents 43abe65 + 8d7792c commit 0ed5497
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ set(model-GENERATED_UHDM ${GENDIR}/src/UHDM.capnp)
set_source_files_properties(${model-GENERATED_UHDM} PROPERTIES GENERATED TRUE)

file(GLOB py_SRC ${PROJECT_SOURCE_DIR}/scripts/*.py)
if(NOT EXISTS ${model-GENERATED_UHDM})
add_custom_command(
OUTPUT ${model-GENERATED_UHDM}
COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/generate.py --source-dirpath=${UHDM_SOURCE_DIR} -output-dirpath=${GENDIR}
Expand All @@ -138,6 +139,7 @@ add_custom_command(
${yaml_SRC}
${templates_SRC}
${include_SRC})
endif()

set(model-GENERATED_SRC ${GENDIR}/src/UHDM.capnp.h
${GENDIR}/src/UHDM.capnp.c++)
Expand Down
13 changes: 9 additions & 4 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ swig_add_library(py_uhdm
${PROJECT_NAME}.i swig_test.cpp
)
target_link_libraries(py_uhdm
PRIVATE uhdm ${Python3_LIBRARIES}
PRIVATE uhdm
)
IF(APPLE)
set_property(TARGET py_uhdm APPEND_STRING PROPERTY
LINK_FLAGS "-undefined dynamic_lookup")
ENDIF()

set_target_properties(py_uhdm PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
)
Expand All @@ -38,11 +43,11 @@ execute_process(

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/uhdm.py
DESTINATION ${CMAKE_INSTALL_PREFIX}/${Python_site_packages}
DESTINATION ${Python_site_packages}
)
install(
TARGETS ${SWIG_MODULE_py_udhm_REAL_NAME}
LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}
TARGETS py_uhdm
LIBRARY DESTINATION ${Python_site_packages}
)

add_test(
Expand Down

0 comments on commit 0ed5497

Please sign in to comment.