-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.backup
105 lines (87 loc) · 2.4 KB
/
CMakeLists.backup
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
cmake_minimum_required(VERSION 3.10)
# Project name and version
project(HelloWtApp VERSION 1.0 LANGUAGES CXX)
# Specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Include directories
include_directories(
"include"
)
# Add source files
set(SOURCES
src/main.cpp
# Add other source files here if needed
)
# Add an executable
add_executable(HelloWtApp ${SOURCES})
# Link libraries
target_link_libraries(HelloWtApp
"/lib/wtd.lib"
"/lib/wthttpd.lib"
"/lib/wtdbo.lib"
"/lib/wtdbosqlite3.lib"
"/lib/wtdbopostgres.lib"
"/lib/wtdbomysql.lib"
)
# Specify the executable's working directory (optional)
set_target_properties(HelloWtApp PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
cmake_minimum_required(VERSION 3.10)
# Project name and version
project(HelloWtApp VERSION 1.0 LANGUAGES CXX)
# Specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Include directories
include_directories(
"C:/Program Files/Wt 4.10.4 msvs2022 x64/include"
)
# Add source files
set(SOURCES
src/main.cpp
# Add other source files here if needed
)
# Add an executable
add_executable(HelloWtApp ${SOURCES})
# Link libraries
target_link_libraries(HelloWtApp
"/lib/wtd.lib"
"/lib/wthttpd.lib"
"/lib/wtdbo.lib"
"/lib/wtdbosqlite3.lib"
"/lib/wtdbopostgres.lib"
"/lib/wtdbomysql.lib"
)
# Specify the executable's working directory (optional)
set_target_properties(HelloWtApp PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
# Copy DLLs to the output directory
add_custom_command(TARGET HelloWtApp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"/bin/wttestd.dll"
"/bin/wtd.dll"
"/bin/libcrypto-1_1.dll"
"/bin/libssl-1_1.dll"
"/bin/libcrypto-1_1d.dll"
"/bin/libssl-1_1d.dll"
"/bin/libhpdf.dll"
"/bin/libhpdfd.dll"
"/bin/wtdbopostgres.dll"
"/bin/wtdbomssqlserver.dll"
"/bin/wtdbo.dll"
"/bin/wtdbomysql.dll"
"/bin/wtdbosqlite3.dll"
"/bin/wthttp.dll"
"/bin/wt.dll"
"/bin/wttest.dll"
"/bin/wtdbopostgresd.dll"
"/bin/wtdbomssqlserverd.dll"
"/bin/wtdbomysqld.dll"
"/bin/wtdbod.dll"
"/bin/wtdbosqlite3d.dll"
"/bin/wthttpd.dll"
$<TARGET_FILE_DIR:HelloWtApp>
)