From 681d732ef80c7008b290c895ee9c01617ed7ff4b Mon Sep 17 00:00:00 2001 From: tszirr Date: Mon, 8 Jul 2013 12:29:49 +0200 Subject: [PATCH 1/2] fix: pre-compiled header conflicts across different build configurations --- cmake-modules/PrecompiledHeader.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake-modules/PrecompiledHeader.cmake b/cmake-modules/PrecompiledHeader.cmake index 07879f466..99c43a3cb 100644 --- a/cmake-modules/PrecompiledHeader.cmake +++ b/cmake-modules/PrecompiledHeader.cmake @@ -1,7 +1,7 @@ MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar) IF(MSVC) GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE) - SET(PrecompiledBinary "${CMAKE_CURRENT_BINARY_DIR}/${PrecompiledBasename}.pch") + SET(PrecompiledBinary "${CMAKE_CFG_INTDIR}/${PrecompiledBasename}.pch") SET(Sources ${${SourcesVar}}) SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource} From 68b897e353256667ba853794fd250c7f18b6b3d6 Mon Sep 17 00:00:00 2001 From: Hauke Rehfeld Date: Tue, 26 Nov 2013 19:43:17 +0100 Subject: [PATCH 2/2] fix: only add uninstall target if not previously defined --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b09ff1ec..e8da67b1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,9 +66,12 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CUR configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config-version.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" @ONLY IMMEDIATE) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT}) -# add make uninstall capability -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) -add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") +# Only generate this target if no higher-level project already has +IF (NOT TARGET uninstall) + # add make uninstall capability + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) + add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") +ENDIF() # Globally enbale Boost resp. the Boost workaround – it is also needed by the # tools which include the Assimp headers.