Major changes: build static and dyn library. the first is for C example, the latter for CS example. The CS example is also ran in the action

This commit is contained in:
Mattia Montanari
2023-02-14 17:16:19 +01:00
parent 1282d6a222
commit aa4d543e99
4 changed files with 50 additions and 28 deletions

View File

@@ -25,12 +25,12 @@ project(example_lib_opengjk_ce
VERSION 1.0.0
)
add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/main.c)
target_link_libraries(${PROJECT_NAME} lib_opengjk_ce)
add_executable(example_lib_opengjk_ce ${CMAKE_CURRENT_SOURCE_DIR}/main.c)
target_link_libraries(example_lib_opengjk_ce obj_openGJK m)
# Copy input files for this example after build
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
TARGET example_lib_opengjk_ce POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/userP.dat
${CMAKE_CURRENT_BINARY_DIR}/userP.dat