1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
6 pkg_check_modules(pkgs REQUIRED glib-2.0 dlog)
7 FOREACH(flag ${pkgs_CFLAGS})
8 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
11 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
13 ### Local include directories
14 include_directories(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
17 add_library(bundle SHARED
23 set_target_properties(bundle PROPERTIES SOVERSION "0")
24 set_target_properties(bundle PROPERTIES VERSION "0.1.31")
25 message(STATUS "Version from debian/changelog: ${VERSION}, Major version: ${VERSION_MAJOR}")
26 target_link_libraries(bundle ${pkgs_LDFLAGS})
29 ### Make pkgconfig file
30 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
31 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/bundle.pc.in ${CMAKE_BINARY_DIR}/bundle.pc @ONLY)
35 install(TARGETS bundle
36 DESTINATION ${LIB_INSTALL_DIR}
39 ${CMAKE_SOURCE_DIR}/include/bundle.h
40 ${CMAKE_SOURCE_DIR}/include/SLP_bundle_PG.h
43 install(FILES ${CMAKE_BINARY_DIR}/bundle.pc
44 DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/
49 add_subdirectory(test)