UDPConnection/CMakeLists.txt

20 lines
642 B
CMake

cmake_minimum_required(VERSION 3.7)
project(UDPConnection)
set(UDPConnection_SOURCES
src/UDPConnection.c
)
set(CMAKE_C_FLAGS "-Wall -Wno-missing-braces")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
set(CMAKE_C_FLAGS_RELEASE "-O3 -D NDEBUG")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug', none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()
add_library(UDPConnection ${UDPConnection_SOURCES})
target_compile_features(UDPConnection PUBLIC c_std_11)