forked from MarcoAttene/MeshFix-V2.1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (55 loc) · 1.86 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
################################################################################
# General Informations
################################################################################
cmake_minimum_required(VERSION 3.0)
project(MeshFix)
################################################################################
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
################################################################################
set(SOURCES
src/TMesh/edge.cpp
src/TMesh/vertex.cpp
src/TMesh/io.cpp
src/TMesh/triangle.cpp
src/TMesh/tin.cpp
src/Algorithms/detectIntersections.cpp
src/Algorithms/holeFilling.cpp
src/Algorithms/marchIntersections.cpp
src/Algorithms/checkAndRepair.cpp
src/Kernel/heap.cpp
src/Kernel/matrix.cpp
src/Kernel/orientation.c
src/Kernel/list.cpp
src/Kernel/coordinates.cpp
src/Kernel/tmesh.cpp
src/Kernel/graph.cpp
src/Kernel/point.cpp
src/Kernel/jqsort.cpp
src/MeshFix/meshfix.cpp
)
################################################################################
add_executable(MeshFix ${SOURCES})
target_include_directories(MeshFix PUBLIC
include/TMesh
include/Kernel
)
################################################################################
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message(STATUS "64 bits compiler detected")
target_compile_definitions(MeshFix PUBLIC -DIS64BITPLATFORM)
set(BIN_FOLDER "bin64")
else()
message(STATUS "32 bits compiler detected")
set(BIN_FOLDER "bin")
endif()
################################################################################
set_target_properties(MeshFix
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${BIN_FOLDER}"
)
# Use C++11
set_target_properties(MeshFix PROPERTIES CXX_STANDARD 11)
set_target_properties(MeshFix PROPERTIES CXX_STANDARD_REQUIRED ON)