included CMakelists.txt into dist
[asdcplib.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.12)\r
2 \r
3 project(asdcplibmod)\r
4 \r
5 # The version number.\r
6 set(VERSION_MAJOR 3)\r
7 set(VERSION_MINOR 0)\r
8 set(VERSION_PATCH 0)\r
9 set(VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})\r
10 set_property(GLOBAL PROPERTY USE_FOLDERS ON)\r
11 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "Default Targets")\r
12 # use, i.e. don't skip the full RPATH for the build tree\r
13 set(CMAKE_SKIP_BUILD_RPATH  OFF)\r
14 # when building, don't use the install RPATH already\r
15 # (but later on when installing)\r
16 set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF) \r
17 set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")\r
18 # add the automatically determined parts of the RPATH\r
19 # which point to directories outside the build tree to the install RPATH\r
20 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)\r
21 # the RPATH to be used when installing, but only if it's not a system directory\r
22 list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)\r
23 if("${isSystemDir}" STREQUAL "-1")\r
24    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")\r
25 endif("${isSystemDir}" STREQUAL "-1")\r
26 \r
27 # Configure a header file to pass some of the CMake settings to the source code.\r
28 configure_file("${PROJECT_SOURCE_DIR}/src/info.in" "${PROJECT_BINARY_DIR}/src/info.h")\r
29 \r
30 # Add the binary tree to the search path for include files so that we will find info.h.\r
31 include_directories("${PROJECT_BINARY_DIR}/src")\r
32 add_subdirectory(src)\r
33 \r
34 set(CPACK_GENERATOR ZIP)\r
35 if(UNIX)\r
36         set(CPACK_GENERATOR ${CPACK_GENERATOR};STGZ;TGZ)\r
37 endif(UNIX)\r
38 if(UNIX AND NOT APPLE)\r
39         set(CPACK_GENERATOR ${CPACK_GENERATOR};DEB;RPM)\r
40 endif(UNIX AND NOT APPLE)\r
41 set(CPACK_PACKAGE_NAME ${PROJECT_NAME})\r
42 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Modified asdcp lib. Can generate MXF resources.")\r
43 set(CPACK_PACKAGE_VENDOR "HSRM")\r
44 set(CPACK_PACKAGE_CONTACT "bjoern.stresing@gmx.de")\r
45 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")\r
46 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})\r
47 set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})\r
48 set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})\r
49 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)\r
50 set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_NAME}{VERSION_MAJOR}.${VERSION_MINOR})\r
51 include(CPack)\r