cmake buildfiles Cleanup / Refactor, no functional changes.

Move away from using hardcoded ${target} when calling install() in cmake
This commit is contained in:
Martijn Berger
2014-11-08 11:32:32 +01:00
parent 5604a3d31d
commit 8f8321bfdb
2 changed files with 60 additions and 54 deletions

View File

@@ -116,7 +116,6 @@ set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests CACHE INTERNAL "" FORCE)
get_blender_version()
# Blender internal features
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER)
@@ -364,6 +363,23 @@ if(WITH_GLEW_ES AND WITH_SYSTEM_GLEW)
set(WITH_SYSTEM_GLEW OFF)
endif()
if(MSVC)
getDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${})
endif()
# By default we want to install to the directory we are compiling our executables
# unless specified otherwise, which we currently do not allow
if(MSVC)
set(BLENDER_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE})
elseif(APPLE)
set(BLENDER_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE})
else()
set(BLENDER_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH})
endif()
set(CMAKE_INSTALL_PREFIX ${BLENDER_INSTALL_PREFIX} CACHE INTERNAL "")
# Apple
if(APPLE)