/CMakeLists.txt
https://bitbucket.org/jrussellsmyth/qntools · CMake · 62 lines · 43 code · 10 blank · 9 comment · 6 complexity · 28627498c7f8b640eb2d48696186ae5d MD5 · raw file
- project(qnTools)
- set(VERSION "0.0.1-SNAPSHOT")
- # Project Options
- option(build-gtk-gui "Build GTK GUI application" OFF)
- option(BUILD_TESTS "Build and execute unit tests" OFF)
- #Basic CMake Settings
- set(CPACK_PACKAGE_VERSION 0.0.1)
- set(CTEST_OUTPUT_ON_FAILURE)
- cmake_minimum_required (VERSION 2.6)
- #Progject global Always options
- set(CMAKE_CXX_FLAGS "-std=c++0x")
- find_package(PkgConfig)
- pkg_check_modules(JSONCPP REQUIRED jsoncpp)
- #Include and Library Paths (unconditional)
- link_directories(${JSONCPP_LIBRARY_DIRS} ${ALSA_LIBRARY_DIRS})
- include_directories(${JSONCPP_INCLUDE_DIRS} ${ALSA_INCLUDE_DIRS})
- #Platform Specific Options
- #elseif not used as it didnt seem to work
- if(WIN32)
- # Do windows specific includes
- add_definitions(-D__WINDOWS_MM__ -D__WINDOWS_KS__ )
- endif(WIN32)
- if(APPLE)
- add_definitions(-D__MACOSX_CORE__)
- endif(APPLE)
- if(UNIX)
- find_package(ALSA REQUIRED)
- add_definitions(-D__LINUX_ALSA__)
- link_directories(${ALSA_LIBRARY_DIRS})
- include_directories(${ALSA_INCLUDE_DIRS})
- endif(UNIX)
- add_subdirectory(qn_update)
- add_subdirectory(presetmanager)
- if(build-gtk-gui)
- pkg_check_modules(GTKMM gtkmm-3.0)
- link_directories(${GTKMM_LIBRARY_DIRS})
- include_directories(${GTKMM_INCLUDE_DIRS})
- add_subdirectory(gtkgui)
- endif(build-gtk-gui)
- #Testing
- if (build-tests)
- enable_testing()
- add_subdirectory(gtest-1.6.0)
- endif(build-tests)
- #Packaging
- INCLUDE (InstallRequiredSystemLibraries)
- set(CPACK_GENERATOR "DEB")
- SET(CPACK_PACKAGE_NAME "qntools")
- SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tools for working with KMI QuNeo")
- SET(CPACK_PACKAGE_CONTACT "jrussell.smyth@gmail.com")
- SET(CPACK_DEBIAN_PACKAGE_DEPENDS "alsa, jsoncpp")
- INCLUDE(CPack)