summaryrefslogtreecommitdiff
path: root/expat/CMakeLists.txt
diff options
context:
space:
mode:
authorMaciej Sroczyński <macieksroczynski@poczta.fm>2020-03-05 10:51:00 +0100
committerMaciej Sroczyński <macieksroczynski@poczta.fm>2020-03-05 10:51:00 +0100
commitb53473b119197baed646a24f735dde427381cbd9 (patch)
tree4868367d2b1efb1e83471b4371ef593d46de6ebb /expat/CMakeLists.txt
parent97932c11a60a46a9f2b10ec72eb71ea23ea59df4 (diff)
downloadlibexpat-git-b53473b119197baed646a24f735dde427381cbd9.tar.gz
Move definition XML_STATIC to public in target
Diffstat (limited to 'expat/CMakeLists.txt')
-rw-r--r--expat/CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
index 752135d3..2cab229c 100644
--- a/expat/CMakeLists.txt
+++ b/expat/CMakeLists.txt
@@ -282,9 +282,6 @@ if(EXPAT_SHARED_LIBS)
endif(MSVC)
else(EXPAT_SHARED_LIBS)
set(_SHARED STATIC)
- if(WIN32)
- add_definitions(-DXML_STATIC)
- endif(WIN32)
endif(EXPAT_SHARED_LIBS)
# Avoid colliding with Expat.dll of Perl's XML::Parser::Expat
@@ -321,6 +318,10 @@ target_include_directories(${EXPAT_TARGET}
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
+if(NOT EXPAT_SHARED_LIBS AND WIN32)
+ target_compile_definitions(${EXPAT_TARGET} PUBLIC -DXML_STATIC)
+endif()
+
expat_install(TARGETS ${EXPAT_TARGET} EXPORT expat
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}