]> git.mxchange.org Git - simgear.git/commitdiff
Attempting to fix import/export linkage on Windows.
authorJames Turner <zakalawe@mac.com>
Thu, 19 Sep 2013 21:07:41 +0000 (22:07 +0100)
committerJames Turner <zakalawe@mac.com>
Thu, 19 Sep 2013 21:07:41 +0000 (22:07 +0100)
Hopefully this tells the Expat headers not to do any clever
declspec(import) or export stuff, which we don't want since we only
use the symbols within SimGearCore, and don't export them.

CMakeLists.txt

index e277761a2d9760853c5666b2cd108a19de92a485..f0c85d8be556d6afaf4dca29fa9a866d1eae17b7 100644 (file)
@@ -230,7 +230,9 @@ if (SYSTEM_EXPAT)
 
 else()
     message(STATUS "Using built-in expat code")
-    add_definitions(-DHAVE_EXPAT_CONFIG_H)
+    # XML_STATIC is important to avoid sg_expat_external.h
+    # declaring symbols as declspec(import)
+    add_definitions(-DHAVE_EXPAT_CONFIG_H -DXML_STATIC)
     set(EXPAT_INCLUDE_DIRS 
            ${PROJECT_SOURCE_DIR}/3rdparty/expat 
            ${PROJECT_BINARY_DIR}/3rdparty/expat)