From 7528aaf961fbba1b27d25f278d8759c0814712a9 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 28 Jul 2014 16:08:43 +0000 Subject: Add BUILD_DEFINES parameter to CMakeLists.txt git-svn-id: https://pugixml.googlecode.com/svn/trunk@1000 99668b35-9821-0410-8761-19e4c4f06640 --- scripts/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 6304e97..0895d28 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,7 +1,9 @@ project(pugixml) cmake_minimum_required(VERSION 2.6) + set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared instead of static library") +set(BUILD_DEFINES "" CACHE STRING "Build defines") if(NOT DEFINED CMAKE_INSTALL_LIBDIR) SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries") @@ -10,6 +12,10 @@ endif() set(HEADERS ../src/pugixml.hpp ../src/pugiconfig.hpp) set(SOURCES ${HEADERS} ../src/pugixml.cpp) +if(DEFINED BUILD_DEFINES) + add_definitions(${BUILD_DEFINES}) +endif() + if(BUILD_SHARED_LIBS) add_library(pugixml SHARED ${SOURCES}) else() -- cgit v1.2.3