-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (32 loc) · 1.73 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
cmake_minimum_required(VERSION 3.11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
project (RollerThrowerDieSoon)
# Source code
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h)
add_executable (${PROJECT_NAME} ${SOURCES} ${HEADERS})
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -pedantic)
# Find libs
find_library(ALLEGRO_LIBRARY NAMES allegro REQUIRED)
find_library(ALLEGRO_ACODEC_LIBRARY NAMES allegro_acodec REQUIRED)
find_library(ALLEGRO_AUDIO_LIBRARY NAMES allegro_audio REQUIRED)
find_library(ALLEGRO_COLOR_LIBRARY NAMES allegro_color REQUIRED)
find_library(ALLEGRO_DIALOG_LIBRARY NAMES allegro_dialog REQUIRED)
find_library(ALLEGRO_FONT_LIBRARY NAMES allegro_font REQUIRED)
find_library(ALLEGRO_IMAGE_LIBRARY NAMES allegro_image REQUIRED)
find_library(ALLEGRO_MAIN_LIBRARY NAMES allegro_main REQUIRED)
find_library(ALLEGRO_PRIMITIVES_LIBRARY NAMES allegro_primitives REQUIRED)
find_library(ALLEGRO_TTF_LIBRARY NAMES allegro_ttf REQUIRED)
# Link Libs
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_ACODEC_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_AUDIO_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_COLOR_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_DIALOG_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_FONT_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_IMAGE_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_MAIN_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_PRIMITIVES_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${ALLEGRO_TTF_LIBRARY})