Switched to C11; added release types
parent
68ce8a3914
commit
6a203b3fe5
|
@ -1,19 +1,26 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
# Use Release as default type
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
# Set Compiler
|
||||
set(CMAKE_C_COMPILER "clang-10")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
project(stj VERSION 0.1)
|
||||
|
||||
# List all files needed in final binary
|
||||
file(GLOB st_SRC "st/*.c" "st/*.h")
|
||||
file(GLOB main_SRC "*.c" "*.h")
|
||||
|
||||
add_executable(stj x.c "${st_SRC}" "${main_SRC}")
|
||||
|
||||
# Find required packages
|
||||
# Store Find*.cmake files in ./cmake
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/")
|
||||
# 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}")
|
||||
target_link_libraries(stj PRIVATE "${FREETYPE_LIBRARIES}")
|
||||
|
|
Reference in New Issue