##// END OF EJS Templates
Prise en compte du suffix des binaires en fonction du BUILD_TYPE
perrinel -
r26:db15cec5313b
parent child
Show More
@@ -1,90 +1,99
1 1 #
2 2 # sciqlop_params : Define compilation parameters
3 3 #
4 4 # Debug or release
5 5 #
6 6 # As the "NMake Makefiles" forces by default the CMAKE_BUILD_TYPE variable to Debug, SCIQLOP_BUILD_TYPE variable is used to be sure that the debug mode is a user choice
7 7 #SET(SCIQLOP_BUILD_TYPE "Release" CACHE STRING "Choose to compile in Debug or Release mode")
8 8
9 9 #IF(SCIQLOP_BUILD_TYPE MATCHES "Debug")
10 10 # MESSAGE (STATUS "Build in Debug")
11 11 # SET (CMAKE_BUILD_TYPE "Debug")
12 12 # SET (DEBUG_SUFFIX "d")
13 13 #ELSE()
14 14 # MESSAGE (STATUS "Build in Release")
15 15 # SET (CMAKE_BUILD_TYPE "Release")
16 16 # SET (SCIQLOP_BUILD_TYPE "Release")
17 17 # SET (DEBUG_SUFFIX "")
18 18 #ENDIF()
19 19
20 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
21 SET (CMAKE_BUILD_TYPE "Debug")
22 SET (DEBUG_SUFFIX "d")
23 ELSE()
24 MESSAGE (STATUS "Build in Release")
25 SET (SCIQLOP_BUILD_TYPE "Release")
26 SET (DEBUG_SUFFIX "")
27 ENDIF()
28
20 29 #
21 30 # Need to compile tests?
22 31 #
23 32 OPTION (BUILD_TESTS "Build the tests" OFF)
24 33 ENABLE_TESTING(${BUILD_TESTS})
25 34
26 35 #
27 36 # Path to the folder for sciqlop's extern libraries.
28 37 #
29 38 # When looking for an external library in sciqlop, we look to the following
30 39 # folders:
31 40 # - The specific folder for the library (generally of the form <LIBRARY>_ROOT_DIR
32 41 # - The global Sciqlop extern folder
33 42 # - The system folders.
34 43 #
35 44 # If a dependency is found in the global extern folder or a specific folder for
36 45 # the library, then it is installed with the sciqlop libraries. If it is found
37 46 # in the system folders, it is not. This behavior can be overriden with the
38 47 # <LIBRARY>_COPY_SHARED_LIBRARIES flag.
39 48 #
40 49 set(SCIQLOP_EXTERN_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/extern"
41 50 CACHE PATH "Path to the folder for sciqlop's extern libraries")
42 51 option(SCIQLOP_FORCE_UPDATE_EXT_ROOT_DIR "Force the <LIBRARY>_ROOT_DIR to be updated to the global sciqlop extern folder"
43 52 OFF)
44 53
45 54 if (SCIQLOP_FORCE_UPDATE_EXT_ROOT_DIR)
46 55 set(libRootDirForceValue FORCE)
47 56 else()
48 57 set(libRootDirForceValue)
49 58 endif()
50 59
51 60
52 61
53 62 #
54 63 # Static or shared libraries
55 64 #
56 65 OPTION (BUILD_SHARED_LIBS "Build the shared libraries" ON)
57 66
58 67 # Generate position independant code (-fPIC)
59 68 SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
60 69
61 70 #
62 71 # Configure installation directories
63 72 #
64 73 IF (UNIX)
65 74 SET(defaultBin "bin")
66 75 SET(defaultInc "include/sciqlop")
67 76
68 77 # 32 or 64 bits compiler
69 78 IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
70 79 SET(defaultLib "lib64/sciqlop")
71 80 ELSE()
72 81 SET(defaultLib "lib/sciqlop")
73 82 ENDIF()
74 83
75 84 SET(defaultDoc "share/docs/sciqlop")
76 85 ELSE()
77 86 SET(defaultBin "bin")
78 87 SET(defaultInc "include/sciqlop")
79 88 SET(defaultLib "lib/sciqlop")
80 89 SET(defaultDoc "docs/sciqlop")
81 90 ENDIF()
82 91
83 92 SET(INSTALL_BINARY_DIR "${defaultBin}" CACHE STRING
84 93 "Installation directory for binaries")
85 94 SET(INSTALL_LIBRARY_DIR "${defaultLib}" CACHE STRING
86 95 "Installation directory for libraries")
87 96 SET(INSTALL_INCLUDE_DIR "${defaultInc}" CACHE STRING
88 97 "Installation directory for headers")
89 98 SET(INSTALL_DOCUMENTATION_DIR "${defaultDoc}" CACHE STRING
90 99 "Installation directory for documentations")
General Comments 0
You need to be logged in to leave comments. Login now