From a77e7147c1814b4ed19d6abce417c8d8c627cc32 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 13 Dec 2011 14:57:51 +0100 Subject: Initial release --- CMakeLists.txt | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..699790f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,60 @@ +project(fastwriter) + +set(FASTWRITER_VERSION "0.0.1") +set(FASTWRITER_ABI_VERSION "0") + +cmake_minimum_required(VERSION 2.8) + + +include(CheckIncludeFiles) +check_include_files("linux/falloc.h" HAVE_LINUX_FALLOC_H) + +set(HEADERS fastwriter.h) +add_definitions("-fPIC --std=c99 -Wall -O2 -pthread") + +add_library(fastwriter SHARED fastwriter.c sysinfo.c default.c) + +set_target_properties(fastwriter PROPERTIES + VERSION ${FASTWRITER_VERSION} + SOVERSION ${FASTWRITER_ABI_VERSION} + LINK_FLAGS "-pthread" +) + +set(TARNAME "fastwriter") +set(PACKAGE_VERSION ${FASTWRITER_VERSION}) +set(PACKAGE_NAME "${TARNAME}") +set(PACKAGE_TARNAME "${TARNAME}") +set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket") + +if(NOT DEFINED BIN_INSTALL_DIR) + set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") +endif(NOT DEFINED BIN_INSTALL_DIR) + +if(NOT DEFINED LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") +endif(NOT DEFINED LIB_INSTALL_DIR) + +if(NOT DEFINED INCLUDE_INSTALL_DIR) + set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${PACKAGE_TARNAME}") +endif(NOT DEFINED INCLUDE_INSTALL_DIR) + +if(NOT DEFINED LOCALE_INSTALL_DIR) + set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale/") +endif(NOT DEFINED LOCALE_INSTALL_DIR) + +configure_file(fastwriter.pc.in ${CMAKE_CURRENT_BINARY_DIR}/fastwriter.pc) +configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +install(TARGETS fastwriter + LIBRARY DESTINATION lib${LIB_SUFFIX} +) + +install(FILES fastwriter.h + DESTINATION include +) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/fastwriter.pc + DESTINATION ${LIB_INSTALL_DIR}/pkgconfig +) -- cgit v1.2.3