From 404c45671a6d7ef82ddb170ec5bc2bf24e6bba58 Mon Sep 17 00:00:00 2001 From: Juan Ramos Date: Tue, 12 Jan 2021 07:47:04 -0500 Subject: [PATCH] Fixed minor issue with install logic --- cmake/cxxopts.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/cxxopts.cmake b/cmake/cxxopts.cmake index 271bf24..9ef6caa 100644 --- a/cmake/cxxopts.cmake +++ b/cmake/cxxopts.cmake @@ -22,6 +22,9 @@ if (CMAKE_VERSION VERSION_GREATER 3.10 OR CMAKE_VERSION VERSION_EQUAL 3.10) include_guard() endif() +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + function(cxxopts_getversion version_arg) # Parse the current version from the cxxopts header file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/cxxopts.hpp" cxxopts_version_defines @@ -79,8 +82,6 @@ endfunction() # Helper function to ecapsulate install logic function(cxxopts_install_logic) - include(GNUInstallDirs) - include(CMakePackageConfigHelpers) set(CXXOPTS_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/cxxopts" CACHE STRING "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.") set(version_config "${PROJECT_BINARY_DIR}/cxxopts-config-version.cmake") set(project_config "${PROJECT_BINARY_DIR}/cxxopts-config.cmake")