From 2d926e432e908db0767f14698113459ea5aaa84a Mon Sep 17 00:00:00 2001 From: bruneton Date: Tue, 2 Jul 2013 09:44:34 +0000 Subject: [PATCH] CMake: adapting installation path of LibBatchConfig.cmake for Win32 --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c84baf2..258ca73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,14 @@ INCLUDE(libbatchMacros) # User options # ============ -SET(INSTALL_CMAKE_CONFIG_DIR share/cmake/libbatch) +IF(WIN32 AND NOT CYGWIN) + # This is really stupid: in the FIND_PACKAGE() command, the default paths + # are not the same under Win and Nix (see CMake doc). This means we have to specify + # different installation directories for LibBatchConfig.cmake: + SET(INSTALL_CMAKE_CONFIG_DIR cmake) +ELSE() + SET(INSTALL_CMAKE_CONFIG_DIR share/cmake/libbatch) +ENDIF() SET(INSTALL_INCLUDE_DIR include) SET(LIBBATCH_LOCAL_SUBMISSION TRUE CACHE BOOL "Build classes for local submission") -- 2.30.2