/alps/fastwriter

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/fastwriter

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-16 17:36:50 UTC
  • Revision ID: csa@suren.me-20160316173650-4yfj2uxq0fzn1r6l
Use GNUInstallDirs to detect install paths

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
set(DISABLE_XFS_REALTIME FALSE CACHE BOOL "Disable support of RealTime XFS partition")
11
11
set(USE_CUSTOM_MEMCPY FALSE CACHE BOOL "Use custom memcpy routine instead of stanadrd")
12
12
 
 
13
include(GNUInstallDirs)
13
14
include(CheckIncludeFiles)
14
15
check_include_files("linux/falloc.h" HAVE_LINUX_FALLOC_H)
15
16
 
61
62
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
62
63
set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket")
63
64
 
64
 
 
65
65
set(CPACK_SOURCE_GENERATOR "TBZ2")
66
66
set(CPACK_PACKAGE_CONTACT "Suren A. Chilingaryan <csa@suren.me>")
67
67
if (${RELEASE} GREATER 0)
77
77
add_custom_target(dist DEPENDS dist_clean COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
78
78
 
79
79
 
80
 
if(NOT DEFINED BIN_INSTALL_DIR)
81
 
    set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
82
 
endif(NOT DEFINED BIN_INSTALL_DIR)
83
 
 
84
 
if(NOT DEFINED LIB_SUFFIX)
85
 
 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
86
 
    set(LIB_SUFFIX "64")
87
 
 else (CMAKE_SIZEOF_VOID_P EQUAL 8)
88
 
    set(LIB_SUFFIX "")
89
 
 endif (CMAKE_SIZEOF_VOID_P EQUAL 8)
90
 
endif(NOT DEFINED LIB_SUFFIX)
91
 
 
92
 
if(NOT DEFINED LIB_INSTALL_DIR)
93
 
    set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
94
 
endif(NOT DEFINED LIB_INSTALL_DIR)
95
 
 
96
 
if(NOT DEFINED INCLUDE_INSTALL_DIR)
97
 
    set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
98
 
endif(NOT DEFINED INCLUDE_INSTALL_DIR)
99
 
 
100
 
if(NOT DEFINED LOCALE_INSTALL_DIR)
101
 
    set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale/")
102
 
endif(NOT DEFINED LOCALE_INSTALL_DIR)
103
 
 
104
80
configure_file(fastwriter.pc.in ${CMAKE_CURRENT_BINARY_DIR}/fastwriter.pc)
105
81
configure_file(fastwriter.spec.in ${CMAKE_CURRENT_BINARY_DIR}/fastwriter.spec)
106
82
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
107
83
 
108
84
install(TARGETS fastwriter
109
 
    LIBRARY DESTINATION lib${LIB_SUFFIX}
 
85
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
110
86
)
111
87
 
112
88
install(FILES fastwriter.h
115
91
 
116
92
install(FILES 
117
93
    ${CMAKE_CURRENT_BINARY_DIR}/fastwriter.pc 
118
 
    DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
 
94
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
119
95
)