ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/CMakeLists.txt
Revision: 349
Committed: Thu Jul 5 08:37:07 2012 UTC (12 years, 11 months ago) by francois
Content type: text/plain
File size: 3145 byte(s)
Log Message:
paramatrisation de cadxfem dans magic et ajout de l utilisation de la librairie vtkdisplay

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