diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake index 1e10bca..eb26ba2 100644 --- a/CMakeModules/ModuleInstall.cmake +++ b/CMakeModules/ModuleInstall.cmake @@ -4,7 +4,15 @@ # ${LIB_NAME} # ${TARGET_H} -SET(INSTALL_INCDIR include) +# Optional Vars: +# ${HEADER_INSTALL_DIR} + +IF(HEADER_INSTALL_DIR) + SET(INSTALL_INCDIR include/${HEADER_INSTALL_DIR}) +ELSE() + SET(INSTALL_INCDIR include/${LIB_NAME}) +ENDIF() + SET(INSTALL_BINDIR bin) IF(WIN32) SET(INSTALL_LIBDIR bin) @@ -40,7 +48,7 @@ ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") IF(NOT OSG_COMPILE_FRAMEWORKS) INSTALL ( FILES ${TARGET_H} - DESTINATION ${INSTALL_INCDIR}/${LIB_NAME} + DESTINATION ${INSTALL_INCDIR} COMPONENT libopenscenegraph-dev ) ELSE() diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index 18b6740..1223a15 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -209,6 +209,7 @@ ENDMACRO(SET_OUTPUT_DIR_PROPERTY_260 TARGET_TARGETNAME RELATIVE_OUTDIR) # TARGET_LIBRARIES are the libraries to link to that are internal to the project and have d suffix for debug # TARGET_EXTERNAL_LIBRARIES are external libraries and are not differentiated with d suffix # TARGET_LABEL is the label IDE should show up for targets +# HEADER_INSTALL_DIR the directory relative to include/ where the ModuleInstall script installs the headers - defaults to LIB_NAME ########################################################################################################## MACRO(SETUP_LIBRARY LIB_NAME) diff --git a/include/osgQt/GraphicsWindowQt b/include/osgQt/GraphicsWindowQt index 9ed8bb2..825676d 100644 --- a/include/osgQt/GraphicsWindowQt +++ b/include/osgQt/GraphicsWindowQt @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/include/osgQt/QFontImplementation b/include/osgQt/QFontImplementation index 5f06c06..10a8b72 100644 --- a/include/osgQt/QFontImplementation +++ b/include/osgQt/QFontImplementation @@ -15,7 +15,6 @@ #include #include -#include #include diff --git a/include/osgQt/QGraphicsViewAdapter b/include/osgQt/QGraphicsViewAdapter index 62fd464..8a8a483 100644 --- a/include/osgQt/QGraphicsViewAdapter +++ b/include/osgQt/QGraphicsViewAdapter @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/include/osgQt/QWebViewImage b/include/osgQt/QWebViewImage index 24d48c7..de9e383 100644 --- a/include/osgQt/QWebViewImage +++ b/include/osgQt/QWebViewImage @@ -26,7 +26,6 @@ #include #include -#include namespace osgQt { diff --git a/include/osgQt/QWidgetImage b/include/osgQt/QWidgetImage index bd36812..d5133e3 100644 --- a/include/osgQt/QWidgetImage +++ b/include/osgQt/QWidgetImage @@ -15,7 +15,6 @@ #define QWIDGETIMAGE #include -#include #include namespace osgQt diff --git a/src/osgQt/CMakeLists.txt b/src/osgQt/CMakeLists.txt index 24cf974..60f3250 100644 --- a/src/osgQt/CMakeLists.txt +++ b/src/osgQt/CMakeLists.txt @@ -7,6 +7,7 @@ ENDIF() IF ( Qt5Widgets_FOUND ) SET(LIB_NAME osgQt5) + SET(HEADER_INSTALL_DIR osgQt) ELSE() SET(LIB_NAME osgQt) ENDIF() @@ -25,9 +26,6 @@ ELSE() set(OSGQT_QT_VERSION 4) ENDIF() -SET(OSGQT_VERSION_HEADER "${PROJECT_BINARY_DIR}/include/osgQt/Version") -CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/Version.in" ${OSGQT_VERSION_HEADER}) - SET(TARGET_H ${HEADER_PATH}/Export ${HEADER_PATH}/GraphicsWindowQt @@ -35,7 +33,6 @@ SET(TARGET_H ${HEADER_PATH}/QGraphicsViewAdapter ${HEADER_PATH}/QWidgetImage ${HEADER_PATH}/QWebViewImage - ${OSGQT_VERSION_HEADER} ) diff --git a/src/osgQt/Version.in b/src/osgQt/Version.in deleted file mode 100644 index dc1a673..0000000 --- a/src/osgQt/Version.in +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef OSGQT_VERSION -#define OSGQT_VERSION - -#define OSGQT_QT_VERSION @OSGQT_QT_VERSION@ - -#include -#if (QT_VERSION < QT_VERSION_CHECK(OSGQT_QT_VERSION,0,0)) -#error "Qt version mismatch detected! Make sure to compile applications using osgQt with the same major Qt version that osgQt has been compiled against." -#endif - - -#endif