-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (25 loc) · 946 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
28
29
30
31
32
if (UNIX)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/windows.cmake CACHE STRING "Windows toolchain file")
endif()
cmake_minimum_required(VERSION 3.14)
project(svg-reader VERSION 0.2)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
find_package(Git)
message(STATUS "GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
add_subdirectory(external/rapidxml)
include_directories(src)
if (UNIX)
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif()
add_compile_options(-static-libgcc)
add_compile_options(-static-libstdc++)
add_link_options(-static-libgcc)
add_link_options(-static-libstdc++)
file(GLOB_RECURSE cpp_files CONFIGURE_DEPENDS "src/*.*pp")
add_executable(${PROJECT_NAME} ${cpp_files})
target_link_libraries(${PROJECT_NAME} PUBLIC -lgdiplus)