Skip to content

Commit

Permalink
Merge pull request #2392 from core-marine-dev/dev
Browse files Browse the repository at this point in the history
Install also the Map++ API headers
  • Loading branch information
deslaughter authored Aug 27, 2024
2 parents 65c21d3 + 85b56f6 commit e204587
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
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 @@ -55,7 +55,7 @@ target_link_libraries(openfast_prelib
icedynlib
icefloelib
ifwlib
maplib
mappplib
moordynlib
orcaflexlib
sctypeslib
Expand Down

0 comments on commit e204587

Please sign in to comment.