diff options
-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 ############################################################ |