This repository has been archived by the owner on Mar 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
70 lines (59 loc) · 2.19 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
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
cmake_minimum_required(VERSION 2.6)
project(feathers CXX C)
# main sources and headers
set(HEADER_DIRECTORY "include")
set(SOURCE_DIRECTORY "source")
set(GENERATED_SOURCE_DIRECTORY "source/generated")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -fdiagnostics-color=always -Wall -Wcast-align -Wcast-qual -Wconversion -Wctor-dtor-privacy -Wdisabled-optimization -Wduplicated-cond -Wextra -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wno-sign-conversion -Wnoexcept -Wnull-dereference -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wstrict-aliasing=1 -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wno-unknown-pragmas -Wuseless-cast -Wno-parentheses -Wno-unused-local-typedefs")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-missing-braces -std=c++17")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_LAYERS")
file(GLOB_RECURSE SOURCES_FILE "${SOURCE_DIRECTORY}/*.cpp" "${GENERATED_SOURCE_DIRECTORY}/*.c")
file(GLOB_RECURSE HEADERS_FILE "${HEADER_DIRECTORY}/*.hpp")
find_package(Vulkan REQUIRED)
find_package(Wayland REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(DRM REQUIRED)
find_package(EGL REQUIRED)
find_package(UDEV REQUIRED)
find_package(OpenGLES3 REQUIRED)
find_package(claws CONFIG REQUIRED)
find_package(magma CONFIG REQUIRED)
include_directories(
${HEADER_DIRECTORY}
${WAYLAND_CLIENT_INCLUDE_DIR}
${WAYLAND_SERVER_INCLUDE_DIR}
${DRM_INCLUDE_DIR}
${GBM_INCLUDE_DIR}
${UDEV_INCLUDE_DIR}
${EGL_INCLUDE_DIR}
${OPENGLES3_INCLUDE_DIR}
)
if (DEFINED CLAWS_DIR)
include_directories(${CLAWS_DIR}/include/)
endif()
if (DEFINED MAGMA_DIR)
include_directories(${MAGMA_DIR}/include/)
endif()
add_executable(
${PROJECT_NAME}
${SOURCES_FILE}
${HEADERS_FILE}
)
target_link_libraries(${PROJECT_NAME}
${Vulkan_LIBRARY}
${WAYLAND_CLIENT_LIBRARIES}
${WAYLAND_SERVER_LIBRARIES}
${DRM_LIBRARY}
${GBM_LIBRARY}
${UDEV_LIBRARY}
${EGL_LIBRARY}
${OPENGLES3_LIBRARY}
xkbcommon
magma::core
)