From 2ae23e1479e35815b51f6e155f61d97e137399a9 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sun, 20 Dec 2020 16:53:46 +0100 Subject: Add build configs --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d92253..34c9fb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,19 @@ cmake_minimum_required(VERSION 3.1) project(ifo_dump LANGUAGES C VERSION 1.0.0 DESCRIPTION "ifo_dump") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +set(CMAKE_C_FLAGS "-std=c89 -Wall -Wextra -Wstrict-aliasing -pedantic -fstrict-aliasing") +set(CMAKE_C_FLAGS_DEBUG "-g") +set(CMAKE_C_FLAGS_RELEASE "-O3 -flto -s") + set(SOURCES ifo_dump.c) # Add the executable add_executable(ifo_dump ${SOURCES}) -target_compile_options(ifo_dump PUBLIC -std=c89 -Wall -Wextra -Wstrict-aliasing -pedantic -fstrict-aliasing) +target_compile_options(ifo_dump PUBLIC) # Include libdvdread target_link_libraries(ifo_dump dvdread) -- cgit v1.2.3