X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2FCMakeFunctions%2FPackages.cmake;h=c42d5b50f760386c2c0e702680bf4fce1a4706ec;hp=830bc741f05843bd6a29c594446b9ac5197a4b3d;hb=3ef806261b5482a584e05dc8311c8d7633f146b4;hpb=ea5f276a69989d4e5797b49083322bac2c9a820c diff --git a/source/CMakeFunctions/Packages.cmake b/source/CMakeFunctions/Packages.cmake index 830bc74..c42d5b5 100644 --- a/source/CMakeFunctions/Packages.cmake +++ b/source/CMakeFunctions/Packages.cmake @@ -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)