aboutsummaryrefslogtreecommitdiff
path: root/main/CMakeLists.txt
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-23 17:10:45 +0100
committerMarvin W <git@larma.de>2017-03-23 17:16:08 +0100
commite6f89f8751e6e65d4a36a125cc3fe398098ba504 (patch)
tree54acce89355ee07b05db761d6d0dad8dad4e0f36 /main/CMakeLists.txt
parentef0483765a0fd567f25b1f0af6df04e8973e5624 (diff)
downloaddino-e6f89f8751e6e65d4a36a125cc3fe398098ba504.tar.gz
dino-e6f89f8751e6e65d4a36a125cc3fe398098ba504.zip
New CMake
- add install and uninstall targets - compatibility for systems without pkg-config
Diffstat (limited to 'main/CMakeLists.txt')
-rw-r--r--main/CMakeLists.txt50
1 files changed, 29 insertions, 21 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 76f5e507..60d91c7b 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -1,19 +1,12 @@
-find_package(Vala REQUIRED)
-find_package(PkgConfig REQUIRED)
-include(${VALA_USE_FILE})
-include(GlibCompileResourcesSupport)
-
-set(MAIN_PACKAGES
- gee-0.8
- glib-2.0
- gtk+-3.0
- gmodule-2.0
- libnotify
- sqlite3
+find_packages(MAIN_PACKAGES REQUIRED
+ Gee
+ GLib>=2.38
+ GModule
+ GObject
+ GTK3>=3.22
+ Libnotify
)
-pkg_check_modules(MAIN REQUIRED ${MAIN_PACKAGES})
-
set(RESOURCE_LIST
icons/dino-double-tick-symbolic.svg
icons/dino-status-away.svg
@@ -107,14 +100,29 @@ PACKAGES
${MAIN_PACKAGES}
GRESOURCES
${MAIN_GRESOURCES_XML}
-OPTIONS
- --target-glib=2.38
- ${GLOBAL_DEBUG_FLAGS}
- --thread
)
-set(CFLAGS ${VALA_CFLAGS} ${MAIN_CFLAGS})
-add_definitions(${CFLAGS})
+add_definitions(${VALA_CFLAGS})
add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET})
add_dependencies(dino dino-vapi dino-gsettings-schema-compiled)
-target_link_libraries(dino libdino ${MAIN_LIBRARIES}) \ No newline at end of file
+target_link_libraries(dino libdino ${MAIN_PACKAGES})
+
+if(WIN32)
+ target_link_libraries(dino -mwindows)
+endif(WIN32)
+
+install(TARGETS dino ${TARGET_INSTALL})
+install(FILES data/dino.desktop DESTINATION ${APPLICATION_INSTALL_DIR})
+install(FILES data/icons/dino.svg DESTINATION ${ICON_INSTALL_DIR}/hicolor/scalable/apps)
+install(FILES data/icons/dino-symbolic.svg DESTINATION ${ICON_INSTALL_DIR}/hicolor/symbolic/apps)
+install(FILES
+ data/icons/dino-status-away.svg
+ data/icons/dino-status-chat.svg
+ data/icons/dino-status-dnd.svg
+ data/icons/dino-status-online.svg
+
+ data/icons/dino-double-tick-symbolic.svg
+ data/icons/dino-tick-symbolic.svg
+DESTINATION
+ ${ICON_INSTALL_DIR}/hicolor/scalable/status
+)