Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Setup CMake to build for macOS
[xestiaab/.git] / source / CMakeFunctions / Packages.cmake
index 830bc74..c42d5b5 100644 (file)
@@ -1,11 +1,30 @@
-find_package(wxWidgets REQUIRED html net adv core base)
+if (MSVC)
+    add_definitions(-D_CRT_SECURE_NO_WARNINGS -DSECURITY_WIN32 -DNOPCH -DWXUSINGDLL -DUNICODE)
+endif()
+
+find_package(wxWidgets REQUIRED html adv core base)
 include(${wxWidgets_USE_FILE})
 
 find_package(LibXml2 REQUIRED)
 include_directories(${LIBXML2_INCLUDE_DIRS})
+if (APPLE)
+    if (LIBXML2_LIBRARY MATCHES "^/usr/lib/.*")
+        message(FATAL_ERROR "Use of macOS's internal libxml2 dynamic library is not allowed.")
+    endif()
+endif()
+
+if(!APPLE)
+    find_package(Iconv REQUIRED)
+    include_directories(${Iconv_INCLUDE_DIR})
+endif()
 
 find_package(CURL REQUIRED)
 include_directories(${CURL_INCLUDE_DIRS})
+if (APPLE)
+    if (LIBXML2_LIBRARY MATCHES "^/usr/lib/.*")
+        message(FATAL_ERROR "Use of macOS's internal libcurl dynamic library is not allowed.")
+    endif()
+endif()
 
 find_package(SFML COMPONENTS audio REQUIRED)
-include_directories(${SFML_INCLUDE_DIR})
\ No newline at end of file
+include_directories(${SFML_DIR}/../include)
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy