diff --git a/CMake.README b/CMake.README index d550b235..5c8112d9 100644 --- a/CMake.README +++ b/CMake.README @@ -56,56 +56,9 @@ Give the path to BOOST_ROOT using commandline: cmake -DBOOST_ROOT=C:/BOOST .. -No find_package(XercesC)? ------------------------- -There is no official FindXercesC.cmake script in the CMake distribution. If needed I can send you the -one I have written for our project. +Installing packages on Debian-derived systems +---------------------------------------- -Which other worskspaces can be generated by cmake? -------------------------------------------------- -Just run cmake without options and look at the list of available generators: -On Windows: -The following generators are available on this platform: - Borland Makefiles = Generates Borland makefiles. - MSYS Makefiles = Generates MSYS makefiles. - MinGW Makefiles = Generates a make file for use with - mingw32-make. - NMake Makefiles = Generates NMake makefiles. - NMake Makefiles JOM = Generates JOM makefiles. - Ninja = Generates build.ninja files (experimental). - Unix Makefiles = Generates standard UNIX makefiles. - Visual Studio 10 = Generates Visual Studio 10 project files. - Visual Studio 10 IA64 = Generates Visual Studio 10 Itanium project - files. - Visual Studio 10 Win64 = Generates Visual Studio 10 Win64 project - files. - Visual Studio 11 = Generates Visual Studio 11 project files. - Visual Studio 11 ARM = Generates Visual Studio 11 ARM project files. - Visual Studio 11 Win64 = Generates Visual Studio 11 Win64 project - files. - Visual Studio 6 = Generates Visual Studio 6 project files. - Visual Studio 7 = Generates Visual Studio .NET 2002 project - files. - Visual Studio 7 .NET 2003 = Generates Visual Studio .NET 2003 project - files. - Visual Studio 8 2005 = Generates Visual Studio .NET 2005 project - files. - Visual Studio 8 2005 Win64 = Generates Visual Studio .NET 2005 Win64 - project files. - Visual Studio 9 2008 = Generates Visual Studio 9 2008 project files. - Visual Studio 9 2008 IA64 = Generates Visual Studio 9 2008 Itanium - project files. - Visual Studio 9 2008 Win64 = Generates Visual Studio 9 2008 Win64 project - files. - Watcom WMake = Generates Watcom WMake makefiles. - CodeBlocks - MinGW Makefiles= Generates CodeBlocks project files. - CodeBlocks - NMake Makefiles= Generates CodeBlocks project files. - CodeBlocks - Ninja = Generates CodeBlocks project files. - CodeBlocks - Unix Makefiles = Generates CodeBlocks project files. - Eclipse CDT4 - MinGW Makefiles - = Generates Eclipse CDT 4.0 project files. - Eclipse CDT4 - NMake Makefiles - = Generates Eclipse CDT 4.0 project files. - Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files. - Eclipse CDT4 - Unix Makefiles - = Generates Eclipse CDT 4.0 project files. \ No newline at end of file +apt install libexpat-dev +apt install libxml2-dev +apt install libxerces-c-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index 41ca7b52..f96b3dd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ if(NOT ARABICA_XML_BACKEND) elseif(APPLE) set(ARABICA_XML_BACKEND USE_LIBXML2) else() - set(ARABICA_XML_BACKEND USE_EXPAT) + set(ARABICA_XML_BACKEND USE_XERCES) endif() endif() @@ -115,7 +115,7 @@ if(ARABICA_XML_BACKEND STREQUAL USE_EXPAT) else() # set externally set(ADDITIONAL_INC ${EXPAT_INCLUDE_DIRS}) - set(ADDITIONAL_LIB expat) + set(ADDITIONAL_LIB ${EXPAT_LIBRARIES}) endif() endif() @@ -123,11 +123,20 @@ endif() # find libxml2: LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES if(ARABICA_XML_BACKEND STREQUAL USE_LIBXML2) set(ARABICA_USE_LIBXML2 TRUE) - find_package(LibXml2) - set(ADDITIONAL_INC ${LIBXML2_INCLUDE_DIR}) + find_package(LibXml2 REQUIRED) + set(ADDITIONAL_INC ${LIBXML2_INCLUDE_DIRS}) set(ADDITIONAL_LIB ${LIBXML2_LIBRARIES}) endif() +# +# find Xerces: XERCES_INCLUDE_DIR XERCES_LIBRARIES +if(ARABICA_XML_BACKEND STREQUAL USE_XERCES) + set(ARABICA_USE_XERCES TRUE) + find_package(XercesC REQUIRED) + set(ADDITIONAL_INC ${XercesC_INCLUDE_DIRS}) + set(ADDITIONAL_LIB ${XercesC_LIBRARIES}) +endif() + # # platform check # diff --git a/include/SAX/ArabicaConfig.hpp.in b/include/SAX/ArabicaConfig.hpp.in index 294ea820..47562720 100644 --- a/include/SAX/ArabicaConfig.hpp.in +++ b/include/SAX/ArabicaConfig.hpp.in @@ -21,7 +21,7 @@ #cmakedefine ARABICA_USE_LIBXML2 /* define to build against Xerces */ -#cmakedefine USE_XERCES +#cmakedefine ARABICA_USE_XERCES /* define to build using Garden */ #cmakedefine USE_GARDEN diff --git a/include/SAX/ParserConfig.hpp b/include/SAX/ParserConfig.hpp index 4114b217..cdf2db7c 100644 --- a/include/SAX/ParserConfig.hpp +++ b/include/SAX/ParserConfig.hpp @@ -21,7 +21,7 @@ #define DEF_SAX_P msxml2_wrapper #endif -#ifdef USE_XERCES +#ifdef ARABICA_USE_XERCES #include #undef DEF_SAX_P #define DEF_SAX_P xerces_wrapper diff --git a/src/arabica.cpp b/src/arabica.cpp index 6ef46bec..9ca84953 100644 --- a/src/arabica.cpp +++ b/src/arabica.cpp @@ -20,7 +20,7 @@ #endif #endif -#ifdef USE_XERCES +#ifdef ARABICA_USE_XERCES #include "SAX/wrappers/saxxerces.cpp" #ifdef _MSC_VER #pragma message("Pulling in Xerces wrappers")