ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/CMakeLists.txt
Revision: 283
Committed: Tue Sep 13 21:11:20 2011 UTC (13 years, 8 months ago) by francois
Content type: text/plain
File size: 2861 byte(s)
Log Message:
structure de l'écriture

File Contents

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