From d4f25c0096c68645c72feb7b77c27e38c197763e Mon Sep 17 00:00:00 2001 From: xantares Date: Wed, 23 Apr 2014 14:12:10 +0200 Subject: [PATCH] Configure assimp-config.cmake.in after Boost is discovered as it requires the Boost version vars --- CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b7250f5b..7a760d2b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,11 +59,6 @@ option ( BUILD_SHARED_LIBS "Build a shared version of the library" ON ) CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY ) INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT ${LIBASSIMP-DEV_COMPONENT}) -# cmake configuration files -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE) -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}) - # Only generate this target if no higher-level project already has IF (NOT TARGET uninstall) # add make uninstall capability @@ -95,6 +90,10 @@ ELSE ( ASSIMP_ENABLE_BOOST_WORKAROUND ) INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ) ENDIF ( ASSIMP_ENABLE_BOOST_WORKAROUND ) +# cmake configuration files +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE) +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}) SET ( ASSIMP_NO_EXPORT OFF CACHE BOOL "Disable Assimp's export functionality."