Skip to content

Commit

Permalink
Merge pull request #1013 from timkpaine/tkp/capnp
Browse files Browse the repository at this point in the history
Move .capnp file to share to avoid excess stuff in lib, make sure windows .lib and .dll in same dir
  • Loading branch information
alaindargelas authored Sep 4, 2023
2 parents 7c60c0f + 9986f2a commit b025396
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,16 @@ else()
endif()

# NOTE: Set the global output directories after the subprojects have had their go at it
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
# Force all .lib and .dll into bin for windows
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
else()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
endif()

set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
${PROJECT_SOURCE_DIR}/model/models.lst
Expand Down Expand Up @@ -367,7 +374,7 @@ install(
install(DIRECTORY ${GENDIR}/uhdm/
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/uhdm/)
install(FILES ${GENDIR}/src/UHDM.capnp
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/uhdm)

# Generate cmake config files for reuse by downstream packages
include(CMakePackageConfigHelpers)
Expand Down

0 comments on commit b025396

Please sign in to comment.