-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
116 lines (85 loc) · 2.17 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
cmake_minimum_required(VERSION 3.5)
if(WIN32)
add_definitions( -DWIN32 )
endif()
option(BUILD_SHARED_LIBS "" OFF)
# add_subdirectory(SDL)
if(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -std=c++17")
add_definitions( -D__MACOSX_CORE__ )
endif(APPLE)
if(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -std=c++17")
add_definitions( -DWIN32 )
endif(WIN32)
if(UNIX AND NOT APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -std=c++17 -fPIE")
set(USE_OPENGLES 1)
add_compile_definitions(USE_OPENGLES=1)
include_directories(
${CMAKE_SYSROOT}/usr/include/libdrm
${CMAKE_SYSROOT}/usr/include/libxml2
${CMAKE_SYSROOT}/usr/include/gbm
${CMAKE_SYSROOT}/usr/include/hiredis
)
link_directories(
${CMAKE_SYSROOT}/home/ec2-user/setupredis/redis-stable/deps/hiredis
)
project(drmview
LANGUAGES C CXX ASM
)
add_definitions( -DUSE_ALSA_AUDIO )
ADD_EXECUTABLE(drmview
drmview.cpp
)
#target_link_libraries(drmview m GLESv2 EGL asound cec pthread rt udev drm gbm dl -static-libstdc++)
target_link_libraries(drmview m GLESv2 EGL asound pthread rt udev drm gbm dl stdc++)
endif(UNIX AND NOT APPLE)
#endif(UNIX)
if(APPLE)
endif(APPLE)
project(lwoview
LANGUAGES C CXX ASM
)
ADD_EXECUTABLE(lwoview
parselwo2.cpp
)
# PROJECT PLAINVIEW
add_subdirectory(SDL)
project(plainview
VERSION 0.0.0
DESCRIPTION "plainview SDL2 remote (c) 2024 Simon Armstrong All rights reserved"
HOMEPAGE_URL "https://github.com/nitrologic/plainview"
LANGUAGES C CXX ASM
)
include_directories(
/usr/include/drm
glfw/include
)
ADD_EXECUTABLE(plainview
platform.h
platform.cpp
glad/gl.h
sdl3driver.h
gl3engine.h
plainview.h
plainview.cpp
# shaders
shaders/rayFragment.glsl
shaders/rayGeometry.glsl
shaders/rayVertex.glsl
# documentation
notes.txt
README.md
# plainshaders.s
)
if(WIN32)
target_link_libraries(plainview SDL3-static Ws2_32 Mswsock Advapi32 WinHttp)
endif(WIN32)
if(APPLE)
target_link_libraries(plainview SDL3-static curl)
endif(APPLE)
if(UNIX)
target_link_libraries(plainview SDL3-static curl)
SET_TARGET_PROPERTIES(plainview PROPERTIES POSITION_INDEPENDENT_CODE OFF)
endif(UNIX)