Added Makefile cmake wrapper
This commit is contained in:
parent
6a203b3fe5
commit
d83fb29d6b
4 changed files with 57 additions and 48 deletions
|
|
@ -5,9 +5,17 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
# Set build dirs (keeps things clean)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
# TODO add adress sanitizer flags n stuff
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
# TODO add optimization flags
|
||||
endif()
|
||||
|
||||
# Set Compiler
|
||||
set(CMAKE_C_COMPILER "clang-10")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
project(stj VERSION 0.1)
|
||||
|
||||
|
|
@ -17,9 +25,6 @@ file(GLOB main_SRC "*.c" "*.h")
|
|||
|
||||
add_executable(stj x.c "${st_SRC}" "${main_SRC}")
|
||||
|
||||
# Set the standard to C11
|
||||
set_property(TARGET stj PROPERTY C_STANDARD 11)
|
||||
|
||||
# Find required packages
|
||||
find_package(Freetype 2 REQUIRED)
|
||||
target_include_directories(stj PRIVATE "${FREETYPE_INCLUDE_DIRS}")
|
||||
|
|
|
|||
Reference in a new issue