Skip to content

Commit

Permalink
Change output dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
dvsku committed Nov 14, 2023
1 parent 5325a3a commit 71f6c9e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
PROJECT (libevp C CXX)
ENABLE_TESTING()

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}")
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(OUTPUT_DIR "bin/linux/${CMAKE_CXX_COMPILER_ID}/${CMAKE_BUILD_TYPE}")
STRING(TOLOWER ${OUTPUT_DIR} OUTPUT_DIR_LOWER)
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
SET(OUTPUT_DIR "bin/windows/${CMAKE_CXX_COMPILER_ID}/${CMAKE_BUILD_TYPE}")
STRING(TOLOWER ${OUTPUT_DIR} OUTPUT_DIR_LOWER)
ENDIF()

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/${OUTPUT_DIR_LOWER}")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/${OUTPUT_DIR_LOWER}")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/${OUTPUT_DIR_LOWER}")

ADD_SUBDIRECTORY("src")
ADD_SUBDIRECTORY("test")

0 comments on commit 71f6c9e

Please sign in to comment.