-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
92 lines (76 loc) · 1.32 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# ${CMAKE_SOURCE_DIR}/window/CMakeLists.txt
find_package(SDL2 REQUIRED)
add_executable(
simpleWindowSDL
simpleWindowSDL.cpp
)
target_link_libraries(
simpleWindowSDL
PRIVATE
SDL2::SDL2
$<$<CXX_COMPILER_ID:MSVC>:SDL2::SDL2main>
options::options
)
if(ENABLE_GLFW)
find_package(GLFW REQUIRED)
add_executable(
simpleWindowGLFW
simpleWindowGLFW.cpp
)
target_link_libraries(
simpleWindowGLFW
PRIVATE
GLFW::glfw3
options::options
)
endif()
if(ENABLE_SFML)
find_package(SFML REQUIRED window)
add_executable(
simpleWindowSFML
simpleWindowSFML.cpp
)
target_link_libraries(
simpleWindowSFML
PRIVATE
sfml-window
options::options
)
endif()
if(ENABLE_Qt5)
find_package(Qt5 REQUIRED Widgets)
add_executable(
simpleWindowQt5
simpleWindowQt5.cpp
)
target_link_libraries(
simpleWindowQt5
PRIVATE
Qt5::Widgets
)
endif()
if(UNIX AND ENABLE_X11)
find_package(X11 REQUIRED)
add_executable(
simpleWindowX11
simpleWindowX11.cpp
)
target_link_libraries(
simpleWindowX11
PRIVATE
X11::X11
options::options
)
endif()
if(WIN32 AND ENABLE_WIN32)
add_executable(
simpleWindowWin32
WIN32
simpleWindowWin32.cpp
)
target_link_libraries(
simpleWindowWin32
PRIVATE
options::options
)
endif()