diff --git a/CMakeLists.txt b/CMakeLists.txt index ce15d5c..e67306b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,14 +2,20 @@ PROJECT(libnfc C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(VERSION_MAJOR "1") SET(VERSION_MINOR "3") -SET(VERSION_PATCH "0") +SET(VERSION_PATCH "2") SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") SET(PACKAGE_NAME "libnfc") SET(PACKAGE_VERSION ${VERSION}) SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") + +IF(NOT MSVC) + SET(_XOPEN_SOURCE 600) +ENDIF(NOT MSVC) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) # make it easy to locate CMake modules for finding libraries SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") @@ -50,6 +56,8 @@ IF(LIBNFC_DEBUG_OUTPUT) ADD_DEFINITIONS(-DDEBUG -g3) ENDIF(LIBNFC_DEBUG_OUTPUT) +ADD_DEFINITIONS("-DHAVE_CONFIG_H") + ADD_DEFINITIONS(-Wall -pedantic -std=c99) IF(NOT MSVC) diff --git a/config.h.cmake b/config.h.cmake index ebace1a..4a31452 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,3 +1,4 @@ #cmakedefine PACKAGE_NAME "@PACKAGE_NAME@" #cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" #cmakedefine PACKAGE_STRING "@PACKAGE_STRING@" +#cmakedefine _XOPEN_SOURCE "@_XOPEN_SOURCE@"