diff options
author | Ted Gould <ted@gould.cx> | 2013-06-27 10:43:13 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2013-06-27 10:43:13 -0500 |
commit | 9daa9b7b0849a121309b5522ef7eb6d34c6712b2 (patch) | |
tree | bfbda0045e277cef9420d2b4fb6b2d04986ca541 /libunity-greeter-session-broadcast | |
parent | 14b46999b69f8dac446e204604adf0981395449c (diff) | |
download | ayatana-greeter-session-broadcast-9daa9b7b0849a121309b5522ef7eb6d34c6712b2.tar.gz ayatana-greeter-session-broadcast-9daa9b7b0849a121309b5522ef7eb6d34c6712b2.tar.bz2 ayatana-greeter-session-broadcast-9daa9b7b0849a121309b5522ef7eb6d34c6712b2.zip |
Adding in a build system
Diffstat (limited to 'libunity-greeter-session-broadcast')
-rw-r--r-- | libunity-greeter-session-broadcast/CMakeLists.txt | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/libunity-greeter-session-broadcast/CMakeLists.txt b/libunity-greeter-session-broadcast/CMakeLists.txt new file mode 100644 index 0000000..7db1f6d --- /dev/null +++ b/libunity-greeter-session-broadcast/CMakeLists.txt @@ -0,0 +1,95 @@ + +########################### +# Version Information +########################### + +set(API_VERSION 1) +set(ABI_VERSION 1) + +########################### +# Generated Lib +########################### + +set(GENERATED_HEADERS +service-iface.h +) + +set(GENERATED_SOURCES +service-iface.c +) + +add_gdbus_codegen( +OUTFILES GENERATED_SOURCES +NAME service-iface +PREFIX com.canonical.Unity.Greeter.Broadcast. +NAMESPACE _ServiceIface +SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/../data/com.canonical.Unity.Greeter.Broadcast.xml +) + +add_library(generated STATIC ${GENERATED_SOURCES}) + +target_link_libraries(generated +${GLIB2_LIBRARIES} +${GOBJECT2_LIBRARIES} +${GIO2_LIBRARIES} +) + +########################### +# Lib +########################### + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") + +set(BROADCAST_HEADERS +unity-greeter-session-broadcast.h +) + +set(BROADCAST_SOURCES +unity-greeter-session-broadcast.c +) + +add_library(broadcast SHARED ${BROADCAST_SOURCES}) + +set_target_properties(broadcast PROPERTIES + VERSION ${API_VERSION}.0.0 + SOVERSION ${ABI_VERSION} + OUTPUT_NAME "unity-greeter-session-broadcast" +) + +target_link_libraries(broadcast +generated +${GLIB2_LIBRARIES} +${GOBJECT2_LIBRARIES} +-Wl,--no-undefined +) + +########################### +# Pkg Config +########################### + +set(BROADCAST_PC "unity-greeter-session-broadcast-${API_VERSION}.pc") +set(apiversion "${API_VERSION}") +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") +set(VERSION "${ABI_VERSION}") + +configure_file("unity-greeter-session-broadcast.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${BROADCAST_PC}" @ONLY) + +########################### +# Installation +########################### + +install( + FILES ${BROADCAST_HEADERS} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libunity-greeter-session-broadcast-${API_VERSION}" +) + +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/${BROADCAST_PC}" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" +) + +install( + TARGETS broadcast + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) |