-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
70 lines (55 loc) · 1.41 KB
/
Copy pathCMakeLists.txt
File metadata and controls
70 lines (55 loc) · 1.41 KB
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
69
70
cmake_minimum_required(VERSION 3.19)
project(Img2STL VERSION 2.0.2)
set(CMAKE_CXX_STANDARD 17)
if(WIN32)
set(wxWidgets_ROOT_DIR "dep/win/")
add_executable(${PROJECT_NAME} WIN32 res/res_msw.rc)
find_package(wxWidgets REQUIRED mono)
target_link_options(
${PROJECT_NAME} PRIVATE
-static -lpthread
)
elseif(MACOSX_BUNDLE)
add_executable(${PROJECT_NAME} MACOSX_BUNDLE)
else() # Linux
set(wxWidgets_CONFIG_OPTIONS --static=yes --version=3.1)
add_executable(${PROJECT_NAME})
find_package(wxWidgets REQUIRED std aui propgrid)
endif()
include(${wxWidgets_USE_FILE})
include_directories(
include
res
${wxWidgets_INCLUDE_DIRS}
)
target_link_libraries(
${PROJECT_NAME}
${wxWidgets_LIBRARIES}
)
target_sources(
${PROJECT_NAME}
PUBLIC
src/Img2STL.cpp
src/Img2STLMainFrame.cpp
src/Img2STLAboutDialog.cpp
src/ui/ui.cpp
src/Executor.cpp
src/Worker.cpp
src/ImgExtFunc.cpp
src/STLFile.cpp
src/Logging.cpp
)
target_compile_options(
${PROJECT_NAME} PRIVATE
-Wall
)
target_link_options(
${PROJECT_NAME} PRIVATE
-static-libgcc
-static-libstdc++
-Wall
)
set_target_properties(
${PROJECT_NAME}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin
)