ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/poly_occ/CMakeLists.txt
Revision: 1007
Committed: Mon Mar 25 16:36:48 2019 UTC (6 years, 5 months ago) by francois
Content type: text/plain
File size: 2781 byte(s)
Log Message:
fusion controlee dans le generateur de polycristal

File Contents

# Content
1 project(poly_occ)
2 cmake_minimum_required(VERSION 2.8)
3 include_directories(/usr/local/include/opencascade ${EXTERNAL_INCLUDES} )
4 set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME})
5 set(OCC_LIBS_REQUIRED
6 TKBin TKBinL TKBinTObj TKCAF TKCDF TKLCAF TKStd TKStdL TKTObj TKVCAF TKXml TKXmlL TKXmlTObj
7 TKBinXCAF TKSTL TKVRML TKXDEIGES TKXmlXCAF
8 # subset of DataExchange
9 TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase TKXCAF TKXDESTEP
10 # ModelingAlgorithms
11 TKOffset TKFeat TKFillet TKBool TKShHealing TKMesh TKHLR TKBO TKPrim
12 TKTopAlgo TKGeomAlgo
13 # ModelingData
14 TKBRep TKGeomBase TKG3d TKG2d
15 # FoundationClasses
16 #TKAdvTools
17 TKMath TKernel)
18 list(LENGTH OCC_LIBS_REQUIRED NUM_OCC_LIBS_REQUIRED)
19 set(OCC_LIBS)
20 foreach(OCC ${OCC_LIBS_REQUIRED})
21 find_library(OCC_LIB ${OCC} PATHS HINTS ENV CASROOT PATH_SUFFIXES lib
22 ${OCC_SYS_NAME}/lib ${OCC_SYS_NAME}/vc8/lib )
23 if(OCC_LIB)
24 list(APPEND OCC_LIBS ${OCC_LIB})
25 endif(OCC_LIB)
26 #set(OCC_LIB OCC_LIB-NOTFOUND CACHE INTERNAL "")
27 unset(OCC_LIB CACHE) # cleaner, but only available in cmake >= 2.6.4
28 endforeach(OCC)
29 list(LENGTH OCC_LIBS NUM_OCC_LIBS)
30 if(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
31 unset(OCC_INC CACHE)
32 find_path(OCC_INC "BRep_Tool.hxx" PATHS ENV CASROOT PATH_SUFFIXES inc
33 include opencascade include/oce)
34
35 if(OCC_INC)
36 add_definitions(-DBREP_OCC)
37 list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS})
38 list(APPEND EXTERNAL_INCLUDES ${OCC_INC})
39 if(HAVE_64BIT_SIZE_T)
40 add_definitions(-D_OCC64)
41 endif(HAVE_64BIT_SIZE_T)
42 if(CYGWIN)
43 list(APPEND EXTERNAL_LIBRARIES "winspool")
44 elseif(MSVC)
45 add_definitions(-DWNT)
46 endif(CYGWIN)
47 find_path(OCC_CONFIG_H "config.h" PATHS ${OCC_INC} ${OCC_CONFIG_H_PATH}
48 NO_DEFAULT_PATH)
49 if(NOT OCC_CONFIG_H)
50 add_definitions(-DHAVE_NO_OCC_CONFIG_H)
51 endif(NOT OCC_CONFIG_H)
52 endif(OCC_INC)
53 endif(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
54 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
55 add_executable(poly_occ.exe src/main.cpp
56 src/polycristal.cpp
57 src/poly_voro.cpp
58 src/poly_build_occ.cpp
59 src/poly_point.cpp
60 src/poly_noeud.cpp
61 src/poly_face.cpp
62 src/poly_cellule.cpp
63 src/poly_affiche.cpp
64 src/ot_boite_3d.cpp
65 voro++-0.4.6/src/voro++.cc
66 )
67 target_link_libraries(poly_occ.exe ${EXTERNAL_LIBRARIES} )
68 add_library(poly_occ SHARED
69 src/polycristal.cpp
70 src/poly_voro.cpp
71 src/poly_build_occ.cpp
72 src/poly_point.cpp
73 src/poly_noeud.cpp
74 src/poly_face.cpp
75 src/poly_cellule.cpp
76 src/poly_affiche.cpp
77 src/ot_boite_3d.cpp
78 voro++-0.4.6/src/voro++.cc)
79 target_link_libraries(poly_occ ${EXTERNAL_LIBRARIES} )