Skip to content

Commit

Permalink
fix: always use top level build dir for output
Browse files Browse the repository at this point in the history
Even if the project is used as a sub-project, we want all output artifacts to
be placed in the top level build dir so that we can run tests, collect install
artifacts, etc... from a single location. THis would work if the project is used
as a top-level or as a sub-project.
  • Loading branch information
abdes committed Feb 26, 2022
1 parent 6373fe7 commit 1b01db2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ project(
LANGUAGES C CXX)

# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

# Create version file
file(WRITE "${PROJECT_BINARY_DIR}/VERSION" "${META_NAME_VERSION}")
Expand Down

0 comments on commit 1b01db2

Please sign in to comment.