From ba2f4227198c7480994cea07f54675b1c4531baa Mon Sep 17 00:00:00 2001 From: codemercenary Date: Wed, 23 Jul 2014 19:26:34 -0700 Subject: [PATCH] CMake configure_file should place config.cmake in the root This change allows the configuration of websocketpp-config.cmake to be compliant with what cmake expects when an "export" statement is used. This adjustment allows the "find_package(websocketpp)" command to behave as expected if a user installs websocketpp via the "INSTALL" project on Windows. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c001353f4..5449af862 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,12 +218,12 @@ print_used_build_config() export (PACKAGE websocketpp) -configure_file (websocketpp-config.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/websocketpp-config.cmake" @ONLY) -configure_file (websocketpp-configVersion.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/websocketpp-configVersion.cmake" @ONLY) +configure_file (websocketpp-config.cmake.in websocketpp-config.cmake @ONLY) +configure_file (websocketpp-configVersion.cmake.in websocketpp-configVersion.cmake @ONLY) # Install the websocketpp-config.cmake and websocketpp-configVersion.cmake install (FILES - "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/websocketpp-config.cmake" - "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/websocketpp-configVersion.cmake" + "websocketpp-config.cmake" + "websocketpp-configVersion.cmake" DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)