Only use bin/ and lib/ as output directories if doing an in-source build.
This prevents littering the source tree if the user does not want to. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@579 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
ed41aa8ce1
commit
9343c3b28f
|
@ -3,8 +3,14 @@ PROJECT( Assimp )
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES( include )
|
INCLUDE_DIRECTORIES( include )
|
||||||
|
|
||||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/lib )
|
# If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
|
||||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/bin )
|
# write the library/executable files to the respective directories in the
|
||||||
|
# source tree. During an out-of-source build, however, do not litter this
|
||||||
|
# directory, since that is probably what the user wanted to avoid.
|
||||||
|
IF ( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
|
||||||
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/lib )
|
||||||
|
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/bin )
|
||||||
|
ENDIF ( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
|
||||||
|
|
||||||
# Cache these to allow the user to override them manually.
|
# Cache these to allow the user to override them manually.
|
||||||
SET( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH
|
SET( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH
|
||||||
|
|
Loading…
Reference in New Issue