blob: a8a426bdf6636b08a1113a83defd74e13ed7b969 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
project(KIRO)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
set(TARNAME "kiro")
set(LIBKIRO_VERSION_MAJOR "0")
set(LIBKIRO_VERSION_MINOR "1")
set(LIBKIRO_VERSION_PATCH "0")
set(LIBKIRO_VERSION_RELEASE "1")
set(LIBKIRO_VERSION_STRING "${LIBKIRO_VERSION_MAJOR}.${LIBKIRO_VERSION_MINOR}.${LIBKIRO_VERSION_PATCH}")
set(VERSION "${LIBKIRO_VERSION_STRING}")
set(LIBKIRO_DESCRIPTION "Tango Device wrapper for an InfiniBand Server and Client")
set(LIBKIRO_ABI_VERSION "${LIBKIRO_VERSION_MAJOR}.${LIBKIRO_VERSION_MINOR}")
set(LIBKIRO_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
find_package(PkgConfig)
pkg_check_modules(GLIB2 glib-2.0>=2.24 REQUIRED)
pkg_check_modules(GOBJECT2 gobject-2.0>=2.24 REQUIRED)
include_directories(
SYSTEM
${GLIB2_INCLUDE_DIRS}
${GOBJECT2_INCLUDE_DIRS}
)
add_definitions(-Wall -Wextra -std=c99)
# check for 64 bit
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(LIB_INSTALL_DIR "lib64")
else()
set(LIB_INSTALL_DIR "lib")
endif()
set(HEADER_INSTALL_DIR include/kiro)
add_subdirectory(src)
add_subdirectory(test)
set(CPACK_PACKAGE_DESCRIPTION ${LIBKIRO_DESCRIPTION})
set(CPACK_PACKAGE_NAME ${TARNAME})
set(CPACK_PACKAGE_CONTACT "Timo Dritschler <timo.dritschler@kit.edu>")
set(CPACK_PACKAGE_VENDOR "Karlsruhe Institute of Technology")
set(CPACK_PACKAGE_VERSION_MAJOR "${LIBKIRO_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${LIBKIRO_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${LIBKIRO_VERSION_PATCH}")
set(CPACK_PACKAGE_RELEASE "${LIBKIRO_VERSION_RELEASE}")
set(CPACK_GENERATOR "TGZ;RPM;")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES "tags" ".git")
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CPACK_SOURCE_PACKAGE_FILE_NAME "LIBKIRO-${LIBKIRO_VERSION_STRING}" CACHE INTERNAL "tarball basename")
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
set(LIBKIRO_PKG_PREFIX ${CMAKE_INSTALL_PREFIX})
set(LIBKIRO_PKG_EXEC_PREFIX "${LIBKIRO_PKG_PREFIX}/bin")
set(LIBKIRO_PKG_LIBDIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
set(LIBKIRO_PKG_INCLUDEDIR "${LIBKIRO_PKG_PREFIX}/include")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/kiro.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/kiro.pc" @ONLY IMMEDIATE)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kiro.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
include(CPack)
|