From: Steve Brokenshire Date: Sat, 3 Oct 2020 17:16:48 +0000 (+0100) Subject: Fix broken Linux and Windows builds X-Git-Tag: release-0.24~5 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=0d97425fcb83c04a0db5558b6e793fbc2372726e;p=xestiaab%2F.git Fix broken Linux and Windows builds --- diff --git a/source/CMakeFunctions/Application.cmake b/source/CMakeFunctions/Application.cmake index d3b44f7..aa8393d 100644 --- a/source/CMakeFunctions/Application.cmake +++ b/source/CMakeFunctions/Application.cmake @@ -62,12 +62,12 @@ if (MSVC) security cryptui crypt32) -endif() - -if (MSVC) list(APPEND FILE_LIST os/msw/xestiaab.rc) + add_executable(xestiaab WIN32 - ${FILE_LIST}) + ${FILE_LIST}) + target_link_libraries(xestiaab LINK_PUBLIC + ${LIBRARIES}) elseif(APPLE) # Main icons set_source_files_properties(os/osx/XestiaAddressBook.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") @@ -116,6 +116,9 @@ elseif(APPLE) else() add_executable(xestiaab ${FILE_LIST}) + + target_link_libraries(xestiaab LINK_PUBLIC + ${LIBRARIES}) endif() diff --git a/source/CMakeFunctions/Packages.cmake b/source/CMakeFunctions/Packages.cmake index c42d5b5..381684f 100644 --- a/source/CMakeFunctions/Packages.cmake +++ b/source/CMakeFunctions/Packages.cmake @@ -13,7 +13,7 @@ if (APPLE) endif() endif() -if(!APPLE) +if(NOT APPLE) find_package(Iconv REQUIRED) include_directories(${Iconv_INCLUDE_DIR}) endif() diff --git a/source/tools/CMakeLists.txt b/source/tools/CMakeLists.txt index 8f1e901..fb9e8b8 100644 --- a/source/tools/CMakeLists.txt +++ b/source/tools/CMakeLists.txt @@ -2,16 +2,22 @@ add_executable(bitmapcode bitmapcode.cpp) if (MSVC) -add_custom_command( - TARGET bitmapcode - POST_BUILD - COMMAND $(OutDir)/bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) + add_custom_command( + TARGET bitmapcode + POST_BUILD + COMMAND $(OutDir)/bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) +endif() + +if (APPLE) + target_link_libraries(bitmapcode + LINK_PUBLIC + c++ + ${wxWidgets_LIBRARIES}) +else() + target_link_libraries(bitmapcode + LINK_PUBLIC + ${wxWidgets_LIBRARIES}) endif() - -target_link_libraries(bitmapcode - LINK_PUBLIC - c++ - ${wxWidgets_LIBRARIES}) set (sources odthelpbrowser/base64.cpp