-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
51 lines (41 loc) · 1.07 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
cmake_minimum_required(VERSION 3.10)
project(vpxds)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
find_package(PkgConfig REQUIRED)
find_package(X11 REQUIRED)
find_package(OpenMP REQUIRED)
pkg_check_modules(SDL2 REQUIRED sdl2)
pkg_check_modules(SDL2_IMAGE REQUIRED SDL2_image)
pkg_check_modules(IMAGEQUANT REQUIRED imagequant)
include_directories(
${CMAKE_SOURCE_DIR}
${X11_INCLUDE_DIR}
${SDL2_INCLUDE_DIRS}
${SDL2_IMAGE_INCLUDE_DIRS}
${IMAGEQUANT_INCLUDE_DIRS}
)
link_directories(
${SDL2_LIBRARY_DIRS}
${SDL2_IMAGE_LIBRARY_DIRS}
${IMAGEQUANT_LIBRARY_DIRS}
)
add_executable(vpxds
main.cpp
VPXDisplayServer.h
VPXDisplayServer.cpp
inc/mongoose/mongoose.c
inc/mongoose/mongoose.h
inc/lodepng/lodepng.cpp
inc/lodepng/lodepng.h
)
target_link_libraries(vpxds
${SDL2_LIBRARIES}
${SDL2_IMAGE_LIBRARIES}
${X11_LIBRARIES}
libimagequant.a
OpenMP::OpenMP_CXX
)
add_custom_command(TARGET vpxds POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_SOURCE_DIR}/assets" "$<TARGET_FILE_DIR:vpxds>/assets"
)