aboutsummaryrefslogtreecommitdiff
path: root/libdino/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/CMakeLists.txt')
-rw-r--r--libdino/CMakeLists.txt38
1 files changed, 18 insertions, 20 deletions
diff --git a/libdino/CMakeLists.txt b/libdino/CMakeLists.txt
index a2b47381..16454115 100644
--- a/libdino/CMakeLists.txt
+++ b/libdino/CMakeLists.txt
@@ -1,17 +1,11 @@
-find_package(Vala REQUIRED)
-find_package(PkgConfig REQUIRED)
-include(${VALA_USE_FILE})
-
-set(LIBDINO_PACKAGES
- gee-0.8
- glib-2.0
- gtk+-3.0
- gmodule-2.0
- sqlite3
+find_packages(LIBDINO_PACKAGES REQUIRED
+ Gee
+ GLib
+ GModule
+ GObject
+ GTK3
)
-pkg_check_modules(LIBDINO REQUIRED ${LIBDINO_PACKAGES})
-
vala_precompile(LIBDINO_VALA_C
SOURCES
src/application.vala
@@ -49,28 +43,27 @@ SOURCES
CUSTOM_VAPIS
"${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi"
"${CMAKE_BINARY_DIR}/exports/qlite.vapi"
+CUSTOM_DEPS
+ xmpp-vala
+ qlite
PACKAGES
${LIBDINO_PACKAGES}
GENERATE_VAPI
dino
GENERATE_HEADER
dino
-OPTIONS
- --target-glib=2.38
- ${GLOBAL_DEBUG_FLAGS}
- --thread
)
-set(CFLAGS ${VALA_CFLAGS} ${LIBDINO_CFLAGS})
-add_definitions(${CFLAGS})
+add_definitions(${VALA_CFLAGS})
add_library(libdino SHARED ${LIBDINO_VALA_C})
add_dependencies(libdino xmpp-vala-vapi qlite-vapi)
-target_link_libraries(libdino xmpp-vala qlite ${LIBDINO_LIBRARIES} -lm)
+target_link_libraries(libdino xmpp-vala qlite ${LIBDINO_PACKAGES} -lm)
set_target_properties(libdino PROPERTIES PREFIX "")
add_custom_target(dino-vapi
DEPENDS
${CMAKE_BINARY_DIR}/exports/dino.vapi
+ ${CMAKE_BINARY_DIR}/exports/dino.deps
)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/gschemas.compiled
@@ -83,4 +76,9 @@ DEPENDS
add_custom_target(dino-gsettings-schema-compiled
DEPENDS
${CMAKE_BINARY_DIR}/gschemas.compiled
-) \ No newline at end of file
+)
+
+install(TARGETS libdino ${TARGET_INSTALL})
+install(FILES ${CMAKE_BINARY_DIR}/exports/dino.vapi ${CMAKE_BINARY_DIR}/exports/dino.deps DESTINATION ${VAPI_INSTALL_DIR})
+install(FILES ${CMAKE_BINARY_DIR}/exports/dino.h DESTINATION ${INCLUDE_INSTALL_DIR})
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/dino.gschema.xml DESTINATION ${SHARE_INSTALL_PREFIX}/glib-2.0/schemas/) \ No newline at end of file