diff options
author | Marvin W <git@larma.de> | 2017-03-23 17:10:45 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-03-23 17:16:08 +0100 |
commit | e6f89f8751e6e65d4a36a125cc3fe398098ba504 (patch) | |
tree | 54acce89355ee07b05db761d6d0dad8dad4e0f36 /xmpp-vala | |
parent | ef0483765a0fd567f25b1f0af6df04e8973e5624 (diff) | |
download | dino-e6f89f8751e6e65d4a36a125cc3fe398098ba504.tar.gz dino-e6f89f8751e6e65d4a36a125cc3fe398098ba504.zip |
New CMake
- add install and uninstall targets
- compatibility for systems without pkg-config
Diffstat (limited to 'xmpp-vala')
-rw-r--r-- | xmpp-vala/CMakeLists.txt | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/xmpp-vala/CMakeLists.txt b/xmpp-vala/CMakeLists.txt index 426f7922..32162f0c 100644 --- a/xmpp-vala/CMakeLists.txt +++ b/xmpp-vala/CMakeLists.txt @@ -1,17 +1,11 @@ -find_package(Vala REQUIRED) -find_package(PkgConfig REQUIRED) -include(GlibCompileResourcesSupport) -include(${VALA_USE_FILE}) - -set(ENGINE_PACKAGES - gee-0.8 - gio-2.0 - glib-2.0 - gdk-3.0 +find_packages(ENGINE_PACKAGES REQUIRED + GDKPixbuf2 + Gee + GIO + GLib + GObject ) -pkg_check_modules(ENGINE REQUIRED ${ENGINE_PACKAGES}) - vala_precompile(ENGINE_VALA_C SOURCES "src/core/namespace_state.vala" @@ -66,19 +60,18 @@ GENERATE_VAPI xmpp-vala GENERATE_HEADER xmpp-vala -OPTIONS - --target-glib=2.38 - ${GLOBAL_DEBUG_FLAGS} - --thread ) -set(CFLAGS ${VALA_CFLAGS} ${ENGINE_CFLAGS}) -add_definitions(${CFLAGS}) +add_definitions(${VALA_CFLAGS}) add_library(xmpp-vala SHARED ${ENGINE_VALA_C}) -target_link_libraries(xmpp-vala ${ENGINE_LIBRARIES}) +target_link_libraries(xmpp-vala ${ENGINE_PACKAGES}) add_custom_target(xmpp-vala-vapi DEPENDS ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi + ${CMAKE_BINARY_DIR}/exports/xmpp-vala.deps ) +install(TARGETS xmpp-vala ${TARGET_INSTALL}) +install(FILES ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/xmpp-vala.deps DESTINATION ${VAPI_INSTALL_DIR}) +install(FILES ${CMAKE_BINARY_DIR}/exports/xmpp-vala.h DESTINATION ${INCLUDE_INSTALL_DIR})
\ No newline at end of file |