diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-30 21:30:52 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-30 21:30:52 (GMT) |
commit | 1dc899c70362de2eed1f6dc074dc5238df0c7f3c (patch) | |
tree | cd2b72b57b41782a85f002c8242d97a12f609dec /CMakeLists.txt | |
parent | b41f77f61791758cd20bd9a0709c7395e5f6ef29 (diff) | |
download | uscxml-1dc899c70362de2eed1f6dc074dc5238df0c7f3c.zip uscxml-1dc899c70362de2eed1f6dc074dc5238df0c7f3c.tar.gz uscxml-1dc899c70362de2eed1f6dc074dc5238df0c7f3c.tar.bz2 |
Still trying to get library order right
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f57d7d4..86cd056 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,6 +319,22 @@ include_directories(src) # Dependent libraries ############################################################ +if (NOT WIN32) + # libxml2 + find_package(LibXml2 REQUIRED) + include_directories(${LIBXML2_INCLUDE_DIR}) + list (APPEND USCXML_CORE_LIBS ${LIBXML2_LIBRARIES}) + set(XML_LIBRARIES ${LIBXML2_LIBRARIES}) + list (APPEND USCXML_CORE_LIBS "dl") + list (APPEND USCXML_CORE_LIBS "pthread") +elseif(WIN32) + list (APPEND XML_LIBRARIES "Ws2_32") + list (APPEND XML_LIBRARIES "Winmm") + list (APPEND XML_LIBRARIES "Iphlpapi") + list (APPEND XML_LIBRARIES "Netapi32") + list (APPEND USCXML_CORE_LIBS ${XML_LIBRARIES}) +endif() + # CURL find_package(CURL REQUIRED) include_directories(${CURL_INCLUDE_DIRS}) @@ -357,7 +373,6 @@ find_package(EVENT REQUIRED) include_directories(${EVENT_INCLUDE_DIR}) list (APPEND USCXML_CORE_LIBS ${EVENT_LIBRARY}) - ################################################# # Gather source files @@ -367,26 +382,10 @@ list (APPEND USCXML_CORE_LIBS ${EVENT_LIBRARY}) include(src/uscxml/CMakeLists.txt) include_directories(${USCXML_INCLUDE_DIRS}) -if (NOT WIN32) - # libxml2 - find_package(LibXml2 REQUIRED) - include_directories(${LIBXML2_INCLUDE_DIR}) - list (APPEND USCXML_CORE_LIBS ${LIBXML2_LIBRARIES}) - set(XML_LIBRARIES ${LIBXML2_LIBRARIES}) - if (NOT APPLE) - list (APPEND USCXML_CORE_LIBS "rt") - endif() - list (APPEND USCXML_CORE_LIBS "dl") - list (APPEND USCXML_CORE_LIBS "pthread") -elseif(WIN32) - list (APPEND XML_LIBRARIES "Ws2_32") - list (APPEND XML_LIBRARIES "Winmm") - list (APPEND XML_LIBRARIES "Iphlpapi") - list (APPEND XML_LIBRARIES "Netapi32") - list (APPEND USCXML_CORE_LIBS ${XML_LIBRARIES}) +if (UNIX AND NOT APPLE) + list (APPEND USCXML_CORE_LIBS "rt") endif() - ############################################################ # Binaries and tests ############################################################ |