ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/CMakeLists.txt
Revision: 258
Committed: Thu Aug 12 19:10:34 2010 UTC (14 years, 10 months ago) by francois
Content type: text/plain
File size: 2823 byte(s)
Log Message:
Mise a jour toxfem + parametrisation compilation toxfem + bug 
comparaison

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 "Enable Occ" ON)
15 option(ENABLE_SAT "Enable Sat" ON)
16 option(ENABLE_STEP "Enable Step" ON)
17 option(ENABLE_IBREP "Enable IBREP" OFF)
18 option(ENABLE_GNURBS "Enable gnurbs" OFF)
19
20 if(ENABLE_OCC)
21 if(WIN32)
22 set(OCC_SYS_NAME win32)
23 else(WIN32)
24 set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME})
25 endif(WIN32)
26 set(OCC_LIBS_REQUIRED
27 # subset of DataExchange
28 TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase
29 # ModelingAlgorithms
30 TKOffset TKFeat TKFillet TKBool TKShHealing TKMesh TKHLR TKBO TKPrim
31 TKTopAlgo TKGeomAlgo
32 # ModelingData
33 TKBRep TKGeomBase TKG3d TKG2d
34 # FoundationClasses
35 TKAdvTools TKMath TKernel)
36 list(LENGTH OCC_LIBS_REQUIRED NUM_OCC_LIBS_REQUIRED)
37 set(OCC_LIBS)
38 foreach(OCC ${OCC_LIBS_REQUIRED})
39 find_library(OCC_LIB ${OCC} PATHS ENV CASROOT PATH_SUFFIXES lib
40 ${OCC_SYS_NAME}/lib)
41 if(OCC_LIB)
42 list(APPEND OCC_LIBS ${OCC_LIB})
43 endif(OCC_LIB)
44 set(OCC_LIB OCC_LIB-NOTFOUND CACHE INTERNAL "")
45 # unset(OCC_LIB CACHE) # cleaner, but only available in cmake >= 2.6.4
46 endforeach(OCC)
47 list(LENGTH OCC_LIBS NUM_OCC_LIBS)
48 if(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
49 find_path(OCC_INC "BRep_Tool.hxx" PATHS ENV CASROOT PATH_SUFFIXES inc
50 include opencascade)
51 if(OCC_INC)
52 add_definitions(-DBREP_OCC)
53 list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS})
54 list(APPEND EXTERNAL_INCLUDES ${OCC_INC})
55 if(HAVE_64BIT_SIZE_T)
56 add_definitions(-D_OCC64)
57 endif(HAVE_64BIT_SIZE_T)
58 if(CYGWIN)
59 list(APPEND EXTERNAL_LIBRARIES "winspool")
60 elseif(MSVC)
61 add_definitions(-DWNT)
62 endif(CYGWIN)
63 find_path(OCC_CONFIG_H "config.h" PATHS ${OCC_INC} ${OCC_CONFIG_H_PATH}
64 NO_DEFAULT_PATH)
65 if(NOT OCC_CONFIG_H)
66 add_definitions(-DHAVE_NO_OCC_CONFIG_H)
67 endif(NOT OCC_CONFIG_H)
68 endif(OCC_INC)
69 endif(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
70 endif(ENABLE_OCC)
71
72 if(ENABLE_SAT)
73 add_definitions(-DBREP_SAT)
74 endif(ENABLE_SAT)
75
76 if(ENABLE_STEP)
77 add_definitions(-DBREP_STEP)
78 endif(ENABLE_STEP)
79
80 if(ENABLE_IBREP)
81 add_subdirectory(IBrep)
82 endif(ENABLE_IBREP)
83
84 if(ENABLE_GNURBS)
85 add_subdirectory(gnurbs)
86 endif(ENABLE_GNURBS)
87
88 add_subdirectory(lib)
89 add_subdirectory(app)
90
91
92