ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/CMakeLists.txt
Revision: 366
Committed: Fri Oct 19 17:15:45 2012 UTC (12 years, 7 months ago) by francois
Content type: text/plain
File size: 3260 byte(s)
Log Message:
Version anglaise pour le comparateur

File Contents

# Content
1 # The name of our project is "GNURBS". CMakeLists files in this project can
2 # refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and
3 # to the root binary directory of the project as ${HELLO_BINARY_DIR}.
4 cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
5
6 if(DEFINED CMAKE_BUILD_TYPE)
7 set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type")
8 else(DEFINED CMAKE_BUILD_TYPE)
9 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type")
10 endif(DEFINED CMAKE_BUILD_TYPE)
11
12 project(MAGIC)
13
14 option(ENABLE_OCC "Magic Enable Occ" ON)
15 option(ENABLE_SAT "Magic Enable Sat" ON)
16 option(ENABLE_STEP "Magic Enable Step" ON)
17 option(ENABLE_IBREP "Magic Enable IBREP" OFF)
18 option(ENABLE_NUTIL "Magic Enable NUTIL (pour la visu VTK)" OFF)
19 option(ENABLE_TEST "Magic Enable test" OFF)
20 option(ENABLE_ENGLISH "Magic Use English" OFF)
21
22
23 set(CADXFEM_PATH "../cadxfem" CACHE STRING "CADXFEM Path")
24
25
26 if(ENABLE_OCC)
27 if(WIN32)
28 set(OCC_SYS_NAME win32)
29 else(WIN32)
30 set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME})
31 endif(WIN32)
32 set(OCC_LIBS_REQUIRED
33 # subset of DataExchange
34 TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase
35 # ModelingAlgorithms
36 TKOffset TKFeat TKFillet TKBool TKShHealing TKMesh TKHLR TKBO TKPrim
37 TKTopAlgo TKGeomAlgo
38 # ModelingData
39 TKBRep TKGeomBase TKG3d TKG2d
40 # FoundationClasses
41 TKAdvTools TKMath TKernel)
42 list(LENGTH OCC_LIBS_REQUIRED NUM_OCC_LIBS_REQUIRED)
43 set(OCC_LIBS)
44 foreach(OCC ${OCC_LIBS_REQUIRED})
45 find_library(OCC_LIB ${OCC} PATHS ENV CASROOT PATH_SUFFIXES lib
46 ${OCC_SYS_NAME}/lib)
47 if(OCC_LIB)
48 list(APPEND OCC_LIBS ${OCC_LIB})
49 endif(OCC_LIB)
50 set(OCC_LIB OCC_LIB-NOTFOUND CACHE INTERNAL "")
51 # unset(OCC_LIB CACHE) # cleaner, but only available in cmake >= 2.6.4
52 endforeach(OCC)
53 list(LENGTH OCC_LIBS NUM_OCC_LIBS)
54 if(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
55 find_path(OCC_INC "BRep_Tool.hxx" PATHS ENV CASROOT PATH_SUFFIXES inc
56 include opencascade)
57 if(OCC_INC)
58 add_definitions(-DBREP_OCC)
59 list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS})
60 list(APPEND EXTERNAL_INCLUDES ${OCC_INC})
61 if(HAVE_64BIT_SIZE_T)
62 add_definitions(-D_OCC64)
63 endif(HAVE_64BIT_SIZE_T)
64 if(CYGWIN)
65 list(APPEND EXTERNAL_LIBRARIES "winspool")
66 elseif(MSVC)
67 add_definitions(-DWNT)
68 endif(CYGWIN)
69 find_path(OCC_CONFIG_H "config.h" PATHS ${OCC_INC} ${OCC_CONFIG_H_PATH}
70 NO_DEFAULT_PATH)
71 if(NOT OCC_CONFIG_H)
72 add_definitions(-DHAVE_NO_OCC_CONFIG_H)
73 endif(NOT OCC_CONFIG_H)
74 endif(OCC_INC)
75 endif(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
76 endif(ENABLE_OCC)
77
78 if(ENABLE_SAT)
79 add_definitions(-DBREP_SAT)
80 endif(ENABLE_SAT)
81
82 if(ENABLE_OCC)
83 add_definitions(-DBREP_OCC)
84 endif(ENABLE_OCC)
85 if(ENABLE_STEP)
86 add_definitions(-DBREP_STEP)
87 endif(ENABLE_STEP)
88
89 if (ENABLE_ENGLISH)
90 add_definitions(-DUSE_ENGLISH)
91 endif(ENABLE_ENGLISH)
92
93 if(ENABLE_IBREP)
94 add_subdirectory(${CADXFEM_PATH}/IBrep "${CMAKE_CURRENT_BINARY_DIR}/IBrep")
95
96 endif(ENABLE_IBREP)
97 if(ENABLE_NUTIL)
98 add_subdirectory(${CADXFEM_PATH}/nutil "${CMAKE_CURRENT_BINARY_DIR}/nutil")
99
100 endif(ENABLE_NUTIL)
101
102 add_subdirectory(lib)
103 add_subdirectory(app)
104
105
106