Skip to content

Commit 002fbf2

Browse files
committed
set install directories depending on target type
1 parent 0006aaa commit 002fbf2

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ include(GenerateExportHeader)
138138
generate_export_header( co_sim_io EXPORT_MACRO_NAME CO_SIM_IO_API EXPORT_FILE_NAME
139139
${CMAKE_CURRENT_SOURCE_DIR}/co_sim_io/includes/co_sim_io_api.hpp )
140140

141-
install(TARGETS co_sim_io DESTINATION bin)
141+
install(TARGETS co_sim_io
142+
LIBRARY DESTINATION libs
143+
ARCHIVE DESTINATION libs
144+
RUNTIME DESTINATION bin
145+
INCLUDES DESTINATION include)
142146

143147
if (CO_SIM_IO_BUILD_MPI)
144148
# optionally enable communication via MPI
@@ -157,7 +161,11 @@ if (CO_SIM_IO_BUILD_MPI)
157161

158162
target_link_libraries(co_sim_io_mpi co_sim_io ${MPI_LIBRARIES})
159163

160-
install(TARGETS co_sim_io_mpi DESTINATION bin)
164+
install(TARGETS co_sim_io_mpi
165+
LIBRARY DESTINATION libs
166+
ARCHIVE DESTINATION libs
167+
RUNTIME DESTINATION bin
168+
INCLUDES DESTINATION include)
161169
endif()
162170

163171
target_include_directories(co_sim_io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/co_sim_io)

0 commit comments

Comments
 (0)