-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_output_directory.cmake
39 lines (28 loc) · 1.28 KB
/
config_output_directory.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
#
#
set( CMAKE_DEBUG_POSTFIX d )
if( CMAKE_RUNTIME_OUTPUT_DIRECTORY )
message( "MOTOR: Omiting output directories, which are set by the user" )
message( "Runtime: " ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
return()
endif()
if( MOTOR_LIBRARY_BUILD_SHARED )
set( MOTOR_LIB_OUTPUT_PATH ${MOTOR_BINARY_DIR}/build/shared )
else()
set( MOTOR_LIB_OUTPUT_PATH ${MOTOR_BINARY_DIR}/build/static)
endif()
message( STATUS "output library path: " ${MOTOR_LIB_OUTPUT_PATH})
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_PACKAGE_OUTPUT_DIRECTORY ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_PDB_OUTPUT_DIRECTORY ${MOTOR_LIB_OUTPUT_PATH} )
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_PACKAGE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${MOTOR_LIB_OUTPUT_PATH} )
set( CMAKE_PDB_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${MOTOR_LIB_OUTPUT_PATH} )
endforeach()