-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
27 lines (20 loc) · 917 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
project(raven C)
# Set compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic")
# Find required packages
find_package(PkgConfig REQUIRED)
pkg_check_modules(RAYLIB REQUIRED raylib)
pkg_check_modules(GTK REQUIRED gtk+-3.0)
pkg_check_modules(LIBAVFORMAT REQUIRED libavformat)
pkg_check_modules(LIBAVUTIL REQUIRED libavutil)
# Include directories
include_directories(${RAYLIB_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${LIBAVFORMAT_INCLUDE_DIRS} ${LIBAVUTIL_INCLUDE_DIRS})
# Set source files
set(SRC_FILES main.c)
# Link libraries
link_libraries(${RAYLIB_LIBRARIES} ${GTK_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVUTIL_LIBRARIES} -lglfw -lm -ldl -lpthread)
# Add executable
add_executable(${PROJECT_NAME} ${SRC_FILES})
# Link to libraries
target_link_libraries(${PROJECT_NAME} ${RAYLIB_LIBRARIES} ${GTK_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVUTIL_LIBRARIES})