Fixed: Use of new CMAKE_*_OUTPUT_DIRECTORY

This commit is contained in:
kervala 2010-10-01 12:45:54 +02:00
parent 9d5fef3491
commit d16325bfd9
2 changed files with 10 additions and 3 deletions

View file

@ -54,9 +54,14 @@ SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}")
#-----------------------------------------------------------------------------
# Redirect output files
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# DLL should be in the same directory as EXE under Windows
IF(WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
ELSE(WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
ENDIF(WIN32)
IF(WIN32)
IF(WITH_MFC)

View file

@ -68,6 +68,8 @@ MACRO(_PCH_GET_PDB_FILENAME out_filename _target)
GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
IF(${_targetType} STREQUAL EXECUTABLE)
SET(_targetOutput ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
ELSEIF(${_targetType} STREQUAL STATIC_LIBRARY)
SET(_targetOutput ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
ELSE(${_targetType} STREQUAL EXECUTABLE)
SET(_targetOutput ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
ENDIF(${_targetType} STREQUAL EXECUTABLE)