ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/CMakeLists.txt
(Generate patch)

Comparing magic/CMakeLists.txt (file contents):
Revision 255 by francois, Wed Jul 14 20:20:19 2010 UTC vs.
Revision 686 by francois, Tue Jul 7 14:45:11 2015 UTC

# Line 3 | Line 3
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)
# Line 11 | Line 12 | endif(DEFINED CMAKE_BUILD_TYPE)
12  
13   project(MAGIC)
14  
15 < option(ENABLE_OCC "Enable Occ" ON)
16 < option(ENABLE_SAT "Enable Sat" ON)
17 < option(ENABLE_STEP "Enable Step" ON)
18 < option(ENABLE_IBREP "Enable IBREP" OFF)
19 < option(ENABLE_GNURBS "Enable gnurbs" OFF)
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" 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  
29   if(ENABLE_OCC)
30 <  if(WIN32)
22 <    set(OCC_SYS_NAME win32)
23 <  else(WIN32)
24 <    set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME})
25 <  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
# Line 36 | Line 41 | if(ENABLE_OCC)
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})
# Line 69 | Line 76 | if(ENABLE_OCC)
76    endif(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
77   endif(ENABLE_OCC)
78  
79 + execute_process(COMMAND "date" "+%Y" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE annee)
80 + execute_process(COMMAND "date" "+%Y" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE dateannee)
81 + SET(ANNEE -DVERSION=\"${annee}\")
82 + SET(DATEANNEE -DDATEVERSION=\"1999-${dateannee}\")
83 +
84 + add_definitions(${ANNEE})
85 + add_definitions(${DATEANNEE})
86 +
87 +
88   if(ENABLE_SAT)
89   add_definitions(-DBREP_SAT)
90   endif(ENABLE_SAT)
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)
98   endif(ENABLE_STEP)
99  
100 <
101 < add_subdirectory(lib)
102 < add_subdirectory(app)
100 > if (ENABLE_ENGLISH)
101 > add_definitions(-DUSE_ENGLISH)
102 > endif(ENABLE_ENGLISH)
103  
104   if(ENABLE_IBREP)
105 < add_subdirectory(IBrep)
105 > add_subdirectory(${CADXFEM_PATH}/IBrep "${CMAKE_CURRENT_BINARY_DIR}/IBrep")
106 > add_definitions(-DIBREP)
107   endif(ENABLE_IBREP)
108 + if(ENABLE_NUTIL)
109 + add_subdirectory(${CADXFEM_PATH}/nutil "${CMAKE_CURRENT_BINARY_DIR}/nutil")
110 + add_definitions(-DVTK_INTERFACE)
111 + endif(ENABLE_NUTIL)
112 +
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)
122 + add_subdirectory(app)
123  
88 if(ENABLE_GNURBS)
89 add_subdirectory(gnurbs)
90 endif(ENABLE_GNURBS)
124  
125  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines