1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 16:57:16 +01:00
SqMod/module/Vendor/MaxmindDB/CMakeLists.txt
2020-03-22 18:43:32 +02:00

41 lines
1.6 KiB
CMake

# This is the libmaxminddb project.
PROJECT(libmaxminddb C)
# Config options
SET(MM_VERSION_MAJOR 1)
SET(MM_VERSION_MINOR 4)
SET(MM_VERSION_PATCH 2)
SET(MM_PACKAGE "libmaxminddb")
SET(MM_PACKAGE_BUGREPORT "support@maxmind.com")
SET(MM_PACKAGE_NAME "libmaxminddb")
SET(MM_PACKAGE_STRING "${MM_PACKAGE_NAME} ${MM_VERSION_MAJOR}.${MM_VERSION_MINOR}.${MM_VERSION_PATCH}")
SET(MM_PACKAGE_TARNAME "libmaxminddb")
SET(MM_PACKAGE_URL "http://maxmind.github.io/libmaxminddb/")
SET(MM_PACKAGE_VERSION "${MM_VERSION_MAJOR}.${MM_VERSION_MINOR}.${MM_VERSION_PATCH}")
SET(MM_VERSION "${MM_VERSION_MAJOR}.${MM_VERSION_MINOR}.${MM_VERSION_PATCH}")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/maxminddb_config.h.in
${CMAKE_CURRENT_BINARY_DIR}/include/maxminddb_config.h)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/maxminddb_config.h.in
${CMAKE_CURRENT_SOURCE_DIR}/include/maxminddb_config.h)
#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
# Create library
add_library(MaxmindDB STATIC include/maxminddb_config.h.in
include/maxminddb.h src/maxminddb.c
src/data-pool.h src/data-pool.c
src/maxminddb-compat-util.h
)
# Set C standard
set_property(TARGET MaxmindDB PROPERTY C_STANDARD 99)
# Configure include folders
target_include_directories(MaxmindDB PRIVATE ${CMAKE_CURRENT_LIST_DIR})
target_include_directories(MaxmindDB PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
# Configure macro options
target_compile_definitions(MaxmindDB PRIVATE )
# Configure build options
if(GCC OR MINGW)
target_compile_options(MaxmindDB PRIVATE -Wno-unused -Wno-incompatible-pointer-types)
endif()