diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-10-29 08:48:27 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-10-29 08:48:27 +0100 |
commit | 85a0f33711fd4467b9027da85ab9e09e406398d4 (patch) | |
tree | abe8cd4fd01a44d7237ac8258d21899606e22b00 /CMakeLists.txt | |
parent | 23211065e9be0d02f5a93c7ab1b6a95e0b38a7ba (diff) | |
download | libuca-85a0f33711fd4467b9027da85ab9e09e406398d4.tar.gz libuca-85a0f33711fd4467b9027da85ab9e09e406398d4.tar.bz2 libuca-85a0f33711fd4467b9027da85ab9e09e406398d4.tar.xz libuca-85a0f33711fd4467b9027da85ab9e09e406398d4.zip |
Cleanup CMakeLists.txt
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e57396..25c07e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.6) project(uca C) +#{{{ CMake +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +#}}} +#{{{ Metadata set(TARNAME "libuca") set(UCA_DESCRIPTION "Unified Camera Access") @@ -15,6 +19,7 @@ set(UCA_VERSION_STRING "${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_ # changed. set(UCA_ABI_VERSION "2") +#{{{ CPack set(CPACK_PACKAGE_VERSION "${UCA_VERSION_STRING}") set(CPACK_PACKAGE_NAME "${TARNAME}") set(PACKAGE_TARNAME "${TARNAME}") @@ -31,28 +36,9 @@ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY ${UCA_DESCRIPTION}) set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") - -set(UCA_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) - -set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") - -set(UCA_ENUM_HDRS - ${CMAKE_CURRENT_SOURCE_DIR}/src/uca-camera.h - ${CMAKE_CURRENT_SOURCE_DIR}/plugins/pco/uca-pco-camera.h) - - -# --- Common configuration --------------------------------------------------- - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/package.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/package.sh) - -# --- Common flags ------------------------------------------------------------ - -add_definitions("-std=c99 -Wall") - - -# --- Common macros - +#}}} +#}}} +#{{{ Macros # create_enums # @prefix: prefix of the output enum files # @template_prefix: prefix of the template (should be src/uca-enums) @@ -78,36 +64,49 @@ macro(create_enums prefix template_prefix header_list) ${CMAKE_CURRENT_BINARY_DIR}/${prefix}.h ) endmacro() +#}}} +#{{{ Configure +set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/package.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/package.sh) -# --- Common libraries -------------------------------------------------------- - -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) - +#}}} +#{{{ Common dependencies find_package(PkgConfig) find_program(GLIB2_MKENUMS glib-mkenums REQUIRED) pkg_check_modules(GLIB2 glib-2.0>=2.24 REQUIRED) pkg_check_modules(GOBJECT2 gobject-2.0>=2.24 REQUIRED) pkg_check_modules(GMODULE2 gmodule-2.0>=2.24 REQUIRED) pkg_check_modules(GIO2 gio-2.0>=2.24 REQUIRED) - +#}}} +#{{{ Common includes include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src ${GLIB2_INCLUDE_DIRS} ${GOBJECT2_INCLUDE_DIRS} ${GMODULE2_INCLUDE_DIRS} ${GIO2_INCLUDE_DIRS}) - +#}}} +#{{{ Common variables set(UCA_DEPS ${GLIB2_LIBRARIES} ${GOBJECT2_LIBRARIES} ${GMODULE2_LIBRARIES} ${GIO2_LIBRARIES}) +set(UCA_ENUM_HDRS + ${CMAKE_CURRENT_SOURCE_DIR}/src/uca-camera.h + ${CMAKE_CURRENT_SOURCE_DIR}/plugins/pco/uca-pco-camera.h) +#}}} +#{{{ Common definitions +add_definitions("-std=c99 -Wall") +#}}} +#{{{ Subdirectories add_subdirectory(src) add_subdirectory(plugins) add_subdirectory(test) add_subdirectory(bin) +#}}} include(CPack) - |