-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (18 loc) · 912 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
cmake_minimum_required(VERSION 3.12)
project(ascii_art)
# Tests
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-long-long -D DEBUG -D LOG_LEVEL=10 -rdynamic -D __TESTING__")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set(CMAKE_CXX_STANDARD 17)
file(GLOB_RECURSE ascii_art_SRC CONFIGURE_DEPENDS
"src/*.h"
"src/*.cpp"
)
add_executable(ascii_art ${ascii_art_SRC})
execute_process(COMMAND nix build .\#cmake-helper.x86_64-linux.cmake-file --no-link --print-out-paths
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE cmake-flake-include)
include(${cmake-flake-include})
target_link_libraries(ascii_art jpeg ncurses ncursesw png z form stdc++fs)