diff options
author | Sebastian Schmelzer | 2011-11-02 15:21:49 +0100 |
---|---|---|
committer | Sebastian Schmelzer | 2011-11-02 15:21:49 +0100 |
commit | 2bb3d5cf99ec05da7ac4d115f0e365c6a2a448b1 (patch) | |
tree | e6db186bf42ee7e039d6b3f3734d91cff4186571 | |
parent | initial import (diff) | |
download | libChooser-2bb3d5cf99ec05da7ac4d115f0e365c6a2a448b1.tar.gz libChooser-2bb3d5cf99ec05da7ac4d115f0e365c6a2a448b1.tar.xz libChooser-2bb3d5cf99ec05da7ac4d115f0e365c6a2a448b1.zip |
cmake stuff
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/CMakeLists.txt | 18 | ||||
-rw-r--r-- | src/Config.h.in | 6 | ||||
-rw-r--r-- | src/Version.h.in | 9 | ||||
-rw-r--r-- | src/libChooser.pc.in | 10 |
5 files changed, 43 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9de597e..786d3af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required(VERSION 2.6) project(libChooser) +set(libChooser_VERSION_MAJOR 0) +set(libChooser_VERSION_MINOR 1) +set(libChooser_VERSION_PATCH 0) + # # Qt4 # diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d81ebf8..b52e552 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,10 @@ set(QT_USE_QTSVG TRUE) include(${QT_USE_FILE}) +configure_file("Version.h.in" "Version.h") +configure_file("libChooser.pc.in" "libChooser.pc") +configure_file("Config.h.in" "Config.h") + set(LCHOOSER_MOC_HEADERS "SessionTreeModel.h") set(LCHOOSER_MOC_SOURCES "SessionTreeModel.cpp") set(LCHOOSER_HEADERS "Session.h" "SessionTreeItem.h" "VSession.h" "VSessionHandler.h" "XSession.h" "XSessionHandler.h") @@ -16,14 +20,14 @@ add_library (Chooser_static STATIC ${LCHOOSER_SOURCES} ${LCHOOSER_MOC_SOURCES} $ set_target_properties (Chooser_static PROPERTIES OUTPUT_NAME Chooser) add_library (Chooser_shared SHARED ${LCHOOSER_SOURCES} ${LCHOOSER_MOC_SOURCES} ${LCHOOSER_HEADERS} ${LCHOOSER_MOC_HEADERS}) set_target_properties (Chooser_shared PROPERTIES OUTPUT_NAME Chooser) -set(MY_OWN_INSTALL_PREFIX "/usr" CACHE PATH "Prefix prepended to install directories") -set(CMAKE_INSTALL_PREFIX "${MY_OWN_INSTALL_PREFIX}" CACHE INTERNAL "Prefix prepended to install directories" FORCE) + install(TARGETS Chooser_static Chooser_shared LIBRARY DESTINATION lib COMPONENT libs ARCHIVE DESTINATION lib COMPONENT libs ) install(FILES ${LCHOOSER_MOC_HEADERS} ${LCHOOSER_HEADERS} DESTINATION include COMPONENT dev) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libChooser.pc" DESTINATION "share/pkgconfig" COMPONENT libs) set(CPACK_COMPONENTS_ALL libs dev) set(CPACK_COMPONENT_LIBS_DISPLAY_NAME "libChooser") @@ -38,8 +42,14 @@ set(CPACK_GENERATOR "DEB") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Sebastian Schmelzer <ssc@xss.nu>") #required set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "emuchooser is ...") set(CPACK_PACKAGE_DESCRIPTION "...") +set(CPACK_PACKAGE_VERSION "${libChooser_VERSION_MAJOR}.${libChooser_VERSION_MINOR}.${libChooser_VERSION_PATCH}") set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqtcore4") -set(CPACK_DEBIAN_PACKAGE_SECTION "") -set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}1.1.1+lenny1") +set(CPACK_DEBIAN_PACKAGE_SECTION "misc") +set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}_oneiric") +set(CPACK_PACKAGE_NAME "libChooser") +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i686") +set(CPACK_PACKAGE_FILE_NAME "libChooser_${CPACK_PACKAGE_VERSION}_ubuntu_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "libChooser_${CPACK_PACKAGE_VERSION}") + INCLUDE(CPack) diff --git a/src/Config.h.in b/src/Config.h.in new file mode 100644 index 0000000..bce2669 --- /dev/null +++ b/src/Config.h.in @@ -0,0 +1,6 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#cmakedefine DEBUG 1 + +#endif //CONFIG_H diff --git a/src/Version.h.in b/src/Version.h.in new file mode 100644 index 0000000..4458a38 --- /dev/null +++ b/src/Version.h.in @@ -0,0 +1,9 @@ +#ifndef VERSION_H +#define VERSION_H + + +#define VERSION_MAJOR @libChooser_VERSION_MAJOR@ +#define VERSION_MINOR @libChooser_VERSION_MINOR@ +#define VERSION_PATCH @libChooser_VERSION_PATCH@ + +#endif //VERSION_H diff --git a/src/libChooser.pc.in b/src/libChooser.pc.in new file mode 100644 index 0000000..db45444 --- /dev/null +++ b/src/libChooser.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@CMAKE_INSTALL_PREFIX@/include +libdir=@CMAKE_INSTALL_PREFIX@/lib + +Name: libChooser +Description: The libChooser library +Version: @libChooser_VERSION_MAJOR@.@libChooser_VERSION_MINOR@.@libChooser_VERSION_PATCH@ +Cflags: -I@CMAKE_INSTALL_PREFIX@/include +Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lChooser |