aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <[email protected]>2015-10-14 21:39:02 +0200
committerChristoph Cullmann <[email protected]>2015-10-14 21:39:02 +0200
commit546db0a778e54898a6f58e2c873a75d22b87177e (patch)
treee0226253e8474646f00cf0c82af225b47ae87a56
parentc7950562ba345257de28f8b2b5a96b4a4e2946ab (diff)
get macos icons working
-rw-r--r--kate/CMakeLists.txt65
1 files changed, 35 insertions, 30 deletions
diff --git a/kate/CMakeLists.txt b/kate/CMakeLists.txt
index d9a61d8..e45b4b6 100644
--- a/kate/CMakeLists.txt
+++ b/kate/CMakeLists.txt
@@ -9,20 +9,6 @@ find_package(KF5 REQUIRED COMPONENTS DBusAddons GuiAddons IconThemes)
# .desktop files and co
add_subdirectory (data)
-# collect icons
-set(KATE_ICONS_PNG
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/16-apps-kate.png
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/22-apps-kate.png
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/32-apps-kate.png
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/48-apps-kate.png
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/64-apps-kate.png
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/128-apps-kate.png
-)
-
-set(KATE_ICONS_SVG
-${CMAKE_CURRENT_SOURCE_DIR}/icons/sc-apps-kate.svgz
-)
-
# includes
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -30,7 +16,7 @@ include_directories(
)
# collect the needed source files
-set (KATE_APPLICATION_SRCS
+set (KATE_LIBRARY_SRCS
kateappadaptor.cpp
kateapp.cpp
kateconfigdialog.cpp
@@ -60,25 +46,13 @@ set (KATE_APPLICATION_SRCS
katewaiter.h
)
-ki18n_wrap_ui(KATE_APPLICATION_SRCS
+ki18n_wrap_ui(KATE_LIBRARY_SRCS
ui/sessionconfigwidget.ui
)
-qt5_add_resources( KATE_APPLICATION_SRCS data/kate.qrc )
-
-
-ecm_add_app_icon(KATE_APPLICATION_SRCS ICONS ${KATE_ICONS_PNG})
-
-add_library(kdeinit_kate STATIC ${KATE_APPLICATION_SRCS})
-generate_export_header(kdeinit_kate
- EXPORT_FILE_NAME kateprivate_export.h
- EXPORT_MACRO_NAME KATE_TESTS_EXPORT
-)
-
-# create executable
-add_executable(kate main.cpp)
-target_link_libraries(kate kdeinit_kate)
+qt5_add_resources( KATE_LIBRARY_SRCS data/kate.qrc )
+add_library(kdeinit_kate STATIC ${KATE_LIBRARY_SRCS})
target_link_libraries(kdeinit_kate
PUBLIC
KF5::TextEditor
@@ -95,6 +69,37 @@ if(KF5Activities_FOUND)
KF5::Activities)
endif()
+generate_export_header(kdeinit_kate
+ EXPORT_FILE_NAME kateprivate_export.h
+ EXPORT_MACRO_NAME KATE_TESTS_EXPORT
+)
+
+# collect icons
+set(KATE_ICONS_PNG
+ ${CMAKE_CURRENT_SOURCE_DIR}/icons/16-apps-kate.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/icons/22-apps-kate.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/icons/32-apps-kate.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/icons/48-apps-kate.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/icons/64-apps-kate.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/icons/128-apps-kate.png
+)
+
+set(KATE_ICONS_SVG
+${CMAKE_CURRENT_SOURCE_DIR}/icons/sc-apps-kate.svgz
+)
+
+# application only sources
+set (KATE_APP_SRCS
+ main.cpp
+)
+
+# add icons to application sources, to have them bundled
+ecm_add_app_icon(KATE_APP_SRCS ICONS ${KATE_ICONS_PNG})
+
+# create executable
+add_executable(kate ${KATE_APP_SRCS})
+target_link_libraries(kate kdeinit_kate)
+
# install executable
install(TARGETS kate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})