From ce18438e729e6c11eebd3a5fb73f4039fdda33a0 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Fri, 9 Oct 2020 21:12:42 +0100 Subject: [PATCH] Fix bitmapcode helper not building when it should be --- source/CMakeFunctions/Application.cmake | 3 +++ source/actmgr/CMakeLists.txt | 3 +++ source/common/CMakeLists.txt | 3 +++ source/export/CMakeLists.txt | 3 +++ source/import/CMakeLists.txt | 5 ++++- source/search/CMakeLists.txt | 5 ++++- source/tools/CMakeLists.txt | 17 +++++++++++++---- source/vcard/CMakeLists.txt | 5 ++++- source/widgets/CMakeLists.txt | 5 ++++- 9 files changed, 41 insertions(+), 8 deletions(-) diff --git a/source/CMakeFunctions/Application.cmake b/source/CMakeFunctions/Application.cmake index aa8393d..2609cd1 100644 --- a/source/CMakeFunctions/Application.cmake +++ b/source/CMakeFunctions/Application.cmake @@ -9,6 +9,9 @@ set(MISC_FILE_LIST convert.cpp add_library(${MISC_TARGET_NAME} ${MISC_FILE_LIST}) +add_dependencies(${MISC_TARGET_NAME} + bitmapcode) + set(FILE_LIST main.cpp AppXestiaAddrBk.cpp AppXestiaAddrBk.h diff --git a/source/actmgr/CMakeLists.txt b/source/actmgr/CMakeLists.txt index 9e87ae0..735c5a2 100644 --- a/source/actmgr/CMakeLists.txt +++ b/source/actmgr/CMakeLists.txt @@ -10,3 +10,6 @@ endif() add_library(${TARGET_NAME} ${FILE_LIST}) + +add_dependencies(${TARGET_NAME} + bitmapcode) diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index 588c631..4621fb8 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -39,3 +39,6 @@ endif() add_library(${TARGET_NAME} ${FILE_LIST}) + +add_dependencies(${TARGET_NAME} + bitmapcode) diff --git a/source/export/CMakeLists.txt b/source/export/CMakeLists.txt index 6073156..f4d08c3 100644 --- a/source/export/CMakeLists.txt +++ b/source/export/CMakeLists.txt @@ -9,3 +9,6 @@ set(FILE_LIST export.cpp add_library(${TARGET_NAME} ${FILE_LIST}) + +add_dependencies(${TARGET_NAME} + bitmapcode) diff --git a/source/import/CMakeLists.txt b/source/import/CMakeLists.txt index f71284e..708597d 100644 --- a/source/import/CMakeLists.txt +++ b/source/import/CMakeLists.txt @@ -13,4 +13,7 @@ set(FILE_LIST frmImportContacts.cpp import-vcard4.h) add_library(${TARGET_NAME} - ${FILE_LIST}) \ No newline at end of file + ${FILE_LIST}) + +add_dependencies(${TARGET_NAME} + bitmapcode) diff --git a/source/search/CMakeLists.txt b/source/search/CMakeLists.txt index 73dfc72..5a32543 100644 --- a/source/search/CMakeLists.txt +++ b/source/search/CMakeLists.txt @@ -11,4 +11,7 @@ set(FILE_LIST frmSearch.cpp XABSearchPanel.h) add_library(${TARGET_NAME} - ${FILE_LIST}) \ No newline at end of file + ${FILE_LIST}) + +add_dependencies(${TARGET_NAME} + bitmapcode) diff --git a/source/tools/CMakeLists.txt b/source/tools/CMakeLists.txt index fb9e8b8..7a05fce 100644 --- a/source/tools/CMakeLists.txt +++ b/source/tools/CMakeLists.txt @@ -2,21 +2,30 @@ add_executable(bitmapcode bitmapcode.cpp) if (MSVC) + target_link_libraries(bitmapcode + LINK_PUBLIC + ${wxWidgets_LIBRARIES}) add_custom_command( TARGET bitmapcode POST_BUILD - COMMAND $(OutDir)/bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) -endif() - -if (APPLE) + COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) +elseif (APPLE) target_link_libraries(bitmapcode LINK_PUBLIC c++ ${wxWidgets_LIBRARIES}) + add_custom_command( + TARGET bitmapcode + POST_BUILD + COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) else() target_link_libraries(bitmapcode LINK_PUBLIC ${wxWidgets_LIBRARIES}) + add_custom_command( + TARGET bitmapcode + POST_BUILD + COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) endif() set (sources diff --git a/source/vcard/CMakeLists.txt b/source/vcard/CMakeLists.txt index ac59f5d..ee9234c 100644 --- a/source/vcard/CMakeLists.txt +++ b/source/vcard/CMakeLists.txt @@ -8,4 +8,7 @@ set(FILE_LIST vcard.cpp vcard34conv-v4conv.cpp) add_library(${TARGET_NAME} - ${FILE_LIST}) \ No newline at end of file + ${FILE_LIST}) + +add_dependencies(${TARGET_NAME} + bitmapcode) diff --git a/source/widgets/CMakeLists.txt b/source/widgets/CMakeLists.txt index 5621203..2bec6ce 100644 --- a/source/widgets/CMakeLists.txt +++ b/source/widgets/CMakeLists.txt @@ -8,4 +8,7 @@ set(FILE_LIST XABAccountView.cpp XABPriorityCtrl.h) add_library(${TARGET_NAME} - ${FILE_LIST}) \ No newline at end of file + ${FILE_LIST}) + +add_dependencies(${TARGET_NAME} + bitmapcode) -- 2.39.2