Merge pull request #4338 from leonvictor/respect-cmake-output-variables
CMAKE: Respect top-level CMAKE_*_OUTPUT_DIRECTORY variablespull/4354/head
commit
c5634be708
|
@ -341,9 +341,24 @@ INCLUDE (FindPkgMacros)
|
||||||
INCLUDE (PrecompiledHeader)
|
INCLUDE (PrecompiledHeader)
|
||||||
|
|
||||||
# Set Assimp project output directory variables.
|
# Set Assimp project output directory variables.
|
||||||
SET(ASSIMP_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for runtime output files")
|
# Will respect top-level CMAKE_*_OUTPUT_DIRECTORY variables if any are set.
|
||||||
SET(ASSIMP_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for library output files")
|
IF(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
|
||||||
SET(ASSIMP_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" CACHE STRING "Path for archive output files")
|
SET(ASSIMP_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for runtime output files")
|
||||||
|
ELSE()
|
||||||
|
SET(ASSIMP_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE STRING "Path for runtime output files")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||||
|
SET(ASSIMP_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for library output files")
|
||||||
|
ELSE()
|
||||||
|
SET(ASSIMP_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE STRING "Path for runtime output files")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
|
||||||
|
SET(ASSIMP_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" CACHE STRING "Path for library output files")
|
||||||
|
ELSE()
|
||||||
|
SET(ASSIMP_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} CACHE STRING "Path for runtime output files")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Macro used to set the output directories of a target to the
|
# Macro used to set the output directories of a target to the
|
||||||
# respective Assimp output directories.
|
# respective Assimp output directories.
|
||||||
|
|
Loading…
Reference in New Issue