3 |
|
# to the root binary directory of the project as ${HELLO_BINARY_DIR}. |
4 |
|
cmake_minimum_required (VERSION 2.6 FATAL_ERROR) |
5 |
|
|
6 |
+ |
|
7 |
|
if(DEFINED CMAKE_BUILD_TYPE) |
8 |
|
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type") |
9 |
|
else(DEFINED CMAKE_BUILD_TYPE) |
15 |
|
option(ENABLE_OCC "Magic Enable Occ" ON) |
16 |
|
option(ENABLE_SAT "Magic Enable Sat" ON) |
17 |
|
option(ENABLE_STEP "Magic Enable Step" ON) |
18 |
+ |
option(ENABLE_CAD4FE "Magic Enable CAD4FE" ON) |
19 |
|
option(ENABLE_IBREP "Magic Enable IBREP" OFF) |
20 |
< |
option(ENABLE_TOIBREP "Magic Enable TOIBREP" OFF) |
20 |
> |
option(ENABLE_TOIBREP "Magic Enable TOIBREP" ON) |
21 |
|
option(ENABLE_NUTIL "Magic Enable NUTIL (pour la visu VTK)" OFF) |
22 |
|
option(ENABLE_TEST "Magic Enable test" OFF) |
23 |
|
option(ENABLE_ENGLISH "Magic Use English" OFF) |
24 |
+ |
option(ENABLE_TUTORIEL "Magic turorial" OFF) |
25 |
|
|
26 |
|
|
27 |
|
set(CADXFEM_PATH "../cadxfem" CACHE STRING "CADXFEM Path") |
28 |
|
|
26 |
– |
|
29 |
|
if(ENABLE_OCC) |
30 |
< |
if(WIN32) |
29 |
< |
set(OCC_SYS_NAME win32) |
30 |
< |
else(WIN32) |
31 |
< |
set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME}) |
32 |
< |
endif(WIN32) |
30 |
> |
set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME}) |
31 |
|
set(OCC_LIBS_REQUIRED |
32 |
|
# subset of DataExchange |
33 |
|
TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase |
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) |
44 |
> |
find_library(OCC_LIB ${OCC} PATHS HINTS ENV CASROOT PATH_SUFFIXES lib |
45 |
> |
${OCC_SYS_NAME}/lib ${OCC_SYS_NAME}/vc8/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 |
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 |
+ |
unset(OCC_INC CACHE) |
55 |
|
find_path(OCC_INC "BRep_Tool.hxx" PATHS ENV CASROOT PATH_SUFFIXES inc |
56 |
< |
include opencascade) |
56 |
> |
include opencascade include/oce) |
57 |
> |
|
58 |
|
if(OCC_INC) |
59 |
|
add_definitions(-DBREP_OCC) |
60 |
|
list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS}) |
91 |
|
|
92 |
|
if(ENABLE_OCC) |
93 |
|
add_definitions(-DBREP_OCC) |
94 |
+ |
add_definitions(-DCSG_OCC) |
95 |
|
endif(ENABLE_OCC) |
96 |
|
if(ENABLE_STEP) |
97 |
|
add_definitions(-DBREP_STEP) |
110 |
|
add_definitions(-DVTK_INTERFACE) |
111 |
|
endif(ENABLE_NUTIL) |
112 |
|
|
113 |
< |
message(STATUS "Configuration de MAGiC${annee}:1999-${dateannee}") |
113 |
> |
if (ENABLE_CAD4FE) |
114 |
> |
add_definitions(-DUSECAD4FE) |
115 |
> |
endif(ENABLE_CAD4FE) |
116 |
> |
|
117 |
|
|
118 |
+ |
message(STATUS "Configuration de MAGiC${annee}:1999-${dateannee}") |
119 |
|
|
120 |
|
|
121 |
|
add_subdirectory(lib) |