aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-25 16:51:17 +0800
committercrupest <crupest@outlook.com>2022-01-25 16:51:17 +0800
commita77fb1aaa4aa765ae51b3cb5a1f8d9c8c233b01a (patch)
treec462ca0c85a1d29f5a7a1fe109a2cbcf0dcff637 /src
parent000e289d06342aaf2c4b0b8cd264401aba1ba3b5 (diff)
downloadcru-a77fb1aaa4aa765ae51b3cb5a1f8d9c8c233b01a.tar.gz
cru-a77fb1aaa4aa765ae51b3cb5a1f8d9c8c233b01a.tar.bz2
cru-a77fb1aaa4aa765ae51b3cb5a1f8d9c8c233b01a.zip
...
Diffstat (limited to 'src')
-rw-r--r--src/ui/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 353695a4..0c81b6c7 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CRU_UI_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/ui)
-
add_library(cru_ui SHARED
Helper.cpp
ThemeManager.cpp
@@ -61,3 +59,10 @@ add_library(cru_ui SHARED
)
target_compile_definitions(cru_ui PRIVATE CRU_UI_EXPORT_API)
target_link_libraries(cru_ui PUBLIC cru_platform_gui cru_xml)
+
+file(GLOB_RECURSE CRU_UI_RES_SOURCES "${CRU_ASSETS_DIR}/cru/ui/*")
+target_sources(cru_ui PUBLIC ${CRU_UI_RES_SOURCES})
+foreach (CRU_UI_RES_FILE ${CRU_UI_RES_SOURCES})
+ file(RELATIVE_PATH CRU_UI_RES_PATH ${CRU_ASSETS_DIR} ${CRU_UI_RES_FILE})
+ set_property(SOURCE ${CRU_UI_RES_FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${CRU_UI_RES_PATH}")
+endforeach(CRU_UI_RES_FILE)