Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install also the Map++ API headers #2392

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion glue-codes/simulink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(MEX_LIBS
$<TARGET_FILE:hydrodynlib>
$<TARGET_FILE:icedynlib>
$<TARGET_FILE:icefloelib>
$<TARGET_FILE:maplib>
$<TARGET_FILE:mappplib>
$<TARGET_FILE:moordynlib>
$<TARGET_FILE:orcaflexlib>
$<TARGET_FILE:sctypeslib>
Expand Down
23 changes: 17 additions & 6 deletions modules/map/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,37 @@ endif()
file(GLOB MAP_CLIB_SOURCES src/*.c src/*.cc src/*/*.c src/*/*.cc)
file(GLOB MAP_C_HEADERS src/*.h src/*/*.h)

add_library(maplib STATIC
add_library(mappplib STATIC
src/map.f90
src/MAP_Types.f90
src/MAP_Fortran_Types.f90
${MAP_CLIB_SOURCES}
)
target_link_libraries(maplib nwtclibs)
target_include_directories(maplib PUBLIC
target_sources(
mappplib
PUBLIC
$<INSTALL_INTERFACE:MAP_Types.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/MAP_Types.h>
$<INSTALL_INTERFACE:mapsys.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/mapsys.h>
$<INSTALL_INTERFACE:mapapi.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/mapapi.h>
)
target_link_libraries(mappplib nwtclibs)
target_include_directories(mappplib PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/bstring>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/cminpack>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/lapack>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/simclist>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)
set_target_properties(maplib PROPERTIES PUBLIC_HEADER src/MAP_Types.h)
get_target_property(MAPPP_PUBLIC_HEADERS mappplib INTERFACE_SOURCES)
set_target_properties(mappplib PROPERTIES PUBLIC_HEADER "${MAPPP_PUBLIC_HEADERS}")

install(TARGETS maplib
install(TARGETS mappplib
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include
PUBLIC_HEADER DESTINATION include/mappp
)
2 changes: 1 addition & 1 deletion modules/openfast-library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ target_link_libraries(openfast_prelib
icedynlib
icefloelib
ifwlib
maplib
mappplib
moordynlib
orcaflexlib
sctypeslib
Expand Down