]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
CMake: adapting installation path of LibBatchConfig.cmake for Win32
authorbruneton <bruneton>
Tue, 2 Jul 2013 09:44:34 +0000 (09:44 +0000)
committerbruneton <bruneton>
Tue, 2 Jul 2013 09:44:34 +0000 (09:44 +0000)
CMakeLists.txt

index c84baf26a27165711104cbcc58fe0827f795c77a..258ca73c74737b81741125291992e59a3e17f056 100644 (file)
@@ -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")