From 0d76afb8014db39c919d4bdb1a6f48b2edeefcea Mon Sep 17 00:00:00 2001 From: Aaron Bishop Date: Sun, 26 Aug 2018 07:36:24 -0400 Subject: [PATCH] Fix using variable before defining it --- source/CMakeLists.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 5fc7bfdb..9de93530 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -135,6 +135,19 @@ endif() # Append "d" to the name of the compiled library set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix") +include(GNUInstallDirs) + +set(XLNT_INC_DEST_DIR ${CMAKE_INSTALL_INCLUDEDIR} + CACHE PATH "Default location to install include files") +set(XLNT_LIB_DEST_DIR ${CMAKE_INSTALL_LIBDIR} + CACHE PATH "Default location to install library files") +set(XLNT_BIN_DEST_DIR ${CMAKE_INSTALL_BINDIR} + CACHE PATH "Default location to install runtime files") +set(XLNT_MAN_DEST_DIR ${CMAKE_INSTALL_MANDIR} + CACHE PATH "Default location to install runtime files") +set(XLNT_CMAKE_CFG_DEST_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + CACHE PATH "Default location to install CMake config files") + if(NOT STATIC) # Compile shared library add_library(xlnt SHARED @@ -159,19 +172,6 @@ endif() # requires cmake 3.8+ #target_compile_features(xlnt PUBLIC cxx_std_${XLNT_CXX_LANG}) -include(GNUInstallDirs) - -set(XLNT_INC_DEST_DIR ${CMAKE_INSTALL_INCLUDEDIR} - CACHE PATH "Default location to install include files") -set(XLNT_LIB_DEST_DIR ${CMAKE_INSTALL_LIBDIR} - CACHE PATH "Default location to install library files") -set(XLNT_BIN_DEST_DIR ${CMAKE_INSTALL_BINDIR} - CACHE PATH "Default location to install runtime files") -set(XLNT_MAN_DEST_DIR ${CMAKE_INSTALL_MANDIR} - CACHE PATH "Default location to install runtime files") -set(XLNT_CMAKE_CFG_DEST_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} - CACHE PATH "Default location to install CMake config files") - # Includes target_include_directories(xlnt PUBLIC