Skip to content

Commit

Permalink
* Properly packaging on OS X
Browse files Browse the repository at this point in the history
git-svn-id: http://opensource.mlba-team.de/svn/xdispatch/trunk@249 9e4c620c-c391-4b63-a7fb-4924991ea895
  • Loading branch information
marius committed Nov 19, 2011
1 parent 0ef1f7f commit 340a429
Show file tree
Hide file tree
Showing 5 changed files with 204 additions and 26 deletions.
32 changes: 25 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ INCLUDE (CheckIncludeFiles)
INCLUDE (CheckSymbolExists)

# start new subproject
set(NAME xdispatch)
project(${NAME})
set(XDISPATCH_VERSION 0.7.0devel)
project(xdispatch)

include(CTest)
enable_testing()
Expand Down Expand Up @@ -34,7 +34,7 @@ if(NOT HAS_MZ_GLOBAL)
endif()

# is the used compiler clang? if so we need blocks support
if(MZ_IS_CLANG)
if(MZ_IS_CLANG AND NOT APPLE)
message("-- linking with the BlocksRuntime")
CHECK_INCLUDE_FILES (Block.h HAVE_BLOCK_H)
if(NOT HAVE_BLOCK_H)
Expand Down Expand Up @@ -143,20 +143,38 @@ endif()
# package target
include(InstallRequiredSystemLibraries)
set(CPACK_COMPONENTS_ALL libxdispatch libQtDispatch)
set(CPACK_COMPONENT_LIBXDISPATCH_DISPLAY_NAME "XDispatch")
set(CPACK_COMPONENT_LIBXDISPATCH_DESCRIPTION "C++ API for Grand Central Dispatch")
set(CPACK_COMPONENT_LIBQTDISPATCH_DISPLAY_NAME "QtDispatch")
set(CPACK_COMPONENT_LIBQTDISPATCH_DESCRIPTION "Provides integration of Grand Central Dispatch into the Qt Event-Loop. Additionally a QThreadPool compatible API to Grand Central Dispatch is provided")
set(CPACK_COMPONENT_LIBQTDISPATCH_DEPENDS libxdispatch)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "userspace implementation of grand central dispatch")
set(CPACK_PACKAGE_VENDOR "www.mlba-team.de")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.dox")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
if(APPLE)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.rtf")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.rtf")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.rtf")
else()
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.dox")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.dox")
endif()
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "7")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_VERSION "0.7.0devel")
set(CPACK_PACKAGE_VERSION "${XDISPATCH_VERSION}")

# package maker (OSX)
if(APPLE)
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
endif()
set(CPACK_OSX_PACKAGE_VERSION "10.6")

# deb package
set(CPACK_DEBIAN_PACKAGE_NAME "libxdispatch")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.13-1) , libgcc1 (>=4.5.1), libstdc++6 (>=4.5.1)") #, libllvm2.9")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Marius Zwicker")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "userspace implementation of grand central dispatch")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Userspace implementation of grand central dispatch")
set(CPACK_PACKAGE_DESCRIPTION "Provides an userspace implementation of the grand central dispatch api introduced with Mac OS X 10.6. Additionally a platform independent C++ interface is included")
set(CPACK_DEBIAN_PACKAGE_SECTION "Devel")
set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-${PACKAGE_COMPILER}-${PACKAGE_ARCH}")
Expand Down
Loading

0 comments on commit 340a429

Please sign in to comment.