1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Try another way because that doesn't work everywhere.

This commit is contained in:
Sandu Liviu Catalin 2020-03-22 18:46:38 +02:00
parent 8f57220b0f
commit d79922d725

View File

@ -27,8 +27,14 @@ add_library(MaxmindDB STATIC include/maxminddb_config.h.in
src/data-pool.h src/data-pool.c
src/maxminddb-compat-util.h
)
# Set C standard
set_property(TARGET MaxmindDB PROPERTY C_STANDARD 99)
# Set C99 standard
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
endif ()
else ()
set(CMAKE_C_STANDARD 99)
endif ()
# Configure include folders
target_include_directories(MaxmindDB PRIVATE ${CMAKE_CURRENT_LIST_DIR})
target_include_directories(MaxmindDB PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)