diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-05-31 13:16:09 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-06-07 14:46:23 +0300 |
commit | 2b01b283ced8b9d5da9d6b1c940103400fa8d8a8 (patch) | |
tree | d1cc572eb5c6d22cb386a277cae1a9de40fcc127 /CMakeLists.txt | |
parent | 7e27fdee6c931728c79d348b94f0258081fdf607 (diff) |
cmake: Improve installation dirs macros
* Use GNUInstallDirs as a base
* Install .dlls in $prefix/bin on windows
* Install cmake config files in lib/cmake/<package>
* Rename macros for readability
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 540cae8..aa8abb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,8 @@ option(USE_GST_PLUGIN_DIR "Install gstreamer plugins at the system location" ON) option(USE_QT_PLUGIN_DIR "Install qt plugins at the system location" ON) set(QT_VERSION "4" CACHE STRING "Qt version used for the build") +include(GNUInstallDirs) include(MacroLogFeature) - include(QtHelpers) macro_log_feature(QT_FOUND "Qt" "Required for building everything" "http://qt.nokia.com/" TRUE "${QT_MIN_VERSION}") @@ -114,25 +114,32 @@ if (CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat-security -Wundef -Wpointer-arith -fno-common") endif () -set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE STRING "Destination directory for libraries") -set(INCLUDES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/${QTGSTREAMER_PACKAGE_NAME}) + +set(QTGSTREAMER_INSTALL_TARGET_DEFAULT_ARGS + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +set(QTGSTREAMER_PC_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +set(QTGSTREAMER_CMAKE_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${QTGSTREAMER_PACKAGE_NAME}) +set(QTGSTREAMER_INCLUDES_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/${QTGSTREAMER_PACKAGE_NAME}) if (USE_GST_PLUGIN_DIR) - set(PLUGINS_INSTALL_DIR ${GSTREAMER_PLUGIN_DIR}) + set(QTGSTREAMER_GST_PLUGINS_INSTALL_DIR ${GSTREAMER_PLUGIN_DIR}) else() - set(PLUGINS_INSTALL_DIR ${LIB_INSTALL_DIR}/gstreamer-0.10) + set(QTGSTREAMER_GST_PLUGINS_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/gstreamer-0.10) endif() if (USE_QT_PLUGIN_DIR) - set(IMPORTS_INSTALL_DIR ${QT_IMPORTS_DIR}) + set(QTGSTREAMER_QTQUICK1_INSTALL_DIR ${QT_IMPORTS_DIR}) else() if (USE_QT5) - set(IMPORTS_INSTALL_DIR ${LIB_INSTALL_DIR}/qt5/imports) + set(QTGSTREAMER_QTQUICK1_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/qt5/imports) else() - set(IMPORTS_INSTALL_DIR ${LIB_INSTALL_DIR}/qt4/imports) + set(QTGSTREAMER_QTQUICK1_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/qt4/imports) endif() endif() + if (QTGSTREAMER_CODEGEN AND FLEX_FOUND AND BISON_FOUND) add_subdirectory(codegen) endif() |