From dea79dc9f58da0ff0334fe14b0d261d9e57979d3 Mon Sep 17 00:00:00 2001 From: Filip Matzner Date: Thu, 5 Apr 2018 14:47:26 +0200 Subject: [PATCH 1/3] Use standard installation path for CMake targets --- CMakeModules/FGInstallDirs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules/FGInstallDirs.cmake b/CMakeModules/FGInstallDirs.cmake index 0d6a1708..613ac03e 100644 --- a/CMakeModules/FGInstallDirs.cmake +++ b/CMakeModules/FGInstallDirs.cmake @@ -40,7 +40,7 @@ endif() # CMake files if(NOT DEFINED FG_INSTALL_CMAKE_DIR) - set(FG_INSTALL_CMAKE_DIR "cmake" CACHE PATH "Installation path for CMake files") + set(FG_INSTALL_CMAKE_DIR "lib/cmake/Forge" CACHE PATH "Installation path for CMake files") endif() # Use absolute paths (these changes are internal and will not show up in cache) From 70be59c5c6d6469f85d9f1c683c5e5d09abaf086 Mon Sep 17 00:00:00 2001 From: Filip Matzner Date: Thu, 5 Apr 2018 14:53:21 +0200 Subject: [PATCH 2/3] Make variable names consistent with the documentation --- CMakeModules/ForgeConfig.cmake.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeModules/ForgeConfig.cmake.in b/CMakeModules/ForgeConfig.cmake.in index baa92c95..8c25e91b 100644 --- a/CMakeModules/ForgeConfig.cmake.in +++ b/CMakeModules/ForgeConfig.cmake.in @@ -36,15 +36,15 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= -SET(FORGE_VERSION "@FORGE_VERSION@") +SET(Forge_VERSION "@Forge_VERSION@") @PACKAGE_INIT@ -SET_AND_CHECK(FORGE_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_INC_DIR@") -SET_AND_CHECK(FORGE_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_LIB_DIR@") +SET_AND_CHECK(Forge_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_INC_DIR@") +SET_AND_CHECK(Forge_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_LIB_DIR@") -FIND_LIBRARY(FORGE_LIBRARIES forge HINTS ${FORGE_LIBRARY_DIRS}) +FIND_LIBRARY(Forge_LIBRARIES forge HINTS ${Forge_LIBRARY_DIRS}) INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(FORGE DEFAULT_MSG - FORGE_INCLUDE_DIRS FORGE_LIBRARIES) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Forge DEFAULT_MSG + Forge_INCLUDE_DIRS Forge_LIBRARIES) From 8b2ddf01a9105fbe40a9c425aac4b0f97db28ff0 Mon Sep 17 00:00:00 2001 From: Filip Matzner Date: Thu, 5 Apr 2018 15:46:46 +0200 Subject: [PATCH 3/3] Use different default INSTALL_CMAKE_DIR for WIN32 --- CMakeModules/FGInstallDirs.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeModules/FGInstallDirs.cmake b/CMakeModules/FGInstallDirs.cmake index 613ac03e..640547ae 100644 --- a/CMakeModules/FGInstallDirs.cmake +++ b/CMakeModules/FGInstallDirs.cmake @@ -40,7 +40,12 @@ endif() # CMake files if(NOT DEFINED FG_INSTALL_CMAKE_DIR) - set(FG_INSTALL_CMAKE_DIR "lib/cmake/Forge" CACHE PATH "Installation path for CMake files") + if(WIN32) + set(cmake_dir "cmake") + else() + set(cmake_dir "lib/cmake/Forge") + endif() + set(FG_INSTALL_CMAKE_DIR "${cmake_dir}" CACHE PATH "Installation path for CMake files") endif() # Use absolute paths (these changes are internal and will not show up in cache)