diff --git a/apps/opencs/view/render/scenewidget.cpp b/apps/opencs/view/render/scenewidget.cpp index 5e8db03cf8..bd1f2c2d30 100644 --- a/apps/opencs/view/render/scenewidget.cpp +++ b/apps/opencs/view/render/scenewidget.cpp @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 9a5669c870..8570d9df60 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -170,8 +170,8 @@ target_link_libraries(openmw-lib ${MyGUI_LIBRARIES} SDL2::SDL2 ${RecastNavigation_LIBRARIES} - "osg-ffmpeg-videoplayer" - "oics" + osg-ffmpeg-videoplayer + oics components ) diff --git a/apps/openmw/mwgui/videowidget.cpp b/apps/openmw/mwgui/videowidget.cpp index 0fc555ab27..0e3ba06049 100644 --- a/apps/openmw/mwgui/videowidget.cpp +++ b/apps/openmw/mwgui/videowidget.cpp @@ -1,6 +1,6 @@ #include "videowidget.hpp" -#include +#include #include diff --git a/apps/openmw/mwinput/bindingsmanager.cpp b/apps/openmw/mwinput/bindingsmanager.cpp index 9523d7ccc2..ac5d9b5730 100644 --- a/apps/openmw/mwinput/bindingsmanager.cpp +++ b/apps/openmw/mwinput/bindingsmanager.cpp @@ -4,8 +4,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/apps/openmw/mwsound/ffmpegdecoder.cpp b/apps/openmw/mwsound/ffmpegdecoder.cpp index df0f42bd7d..d780db8f07 100644 --- a/apps/openmw/mwsound/ffmpegdecoder.cpp +++ b/apps/openmw/mwsound/ffmpegdecoder.cpp @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #if OPENMW_FFMPEG_5_OR_GREATER #include diff --git a/apps/openmw/mwsound/ffmpegdecoder.hpp b/apps/openmw/mwsound/ffmpegdecoder.hpp index 519d160cd2..17f1301c3e 100644 --- a/apps/openmw/mwsound/ffmpegdecoder.hpp +++ b/apps/openmw/mwsound/ffmpegdecoder.hpp @@ -3,8 +3,8 @@ #include -#include -#include +#include +#include #if defined(_MSC_VER) #pragma warning(push) diff --git a/apps/openmw/mwsound/movieaudiofactory.cpp b/apps/openmw/mwsound/movieaudiofactory.cpp index 6e479f5af2..647619d9ed 100644 --- a/apps/openmw/mwsound/movieaudiofactory.cpp +++ b/apps/openmw/mwsound/movieaudiofactory.cpp @@ -1,8 +1,8 @@ #include "movieaudiofactory.hpp" -#include -#include -#include +#include +#include +#include #include "../mwbase/environment.hpp" #include "../mwbase/soundmanager.hpp" diff --git a/apps/openmw/mwsound/movieaudiofactory.hpp b/apps/openmw/mwsound/movieaudiofactory.hpp index 0af1066af5..71dca9e889 100644 --- a/apps/openmw/mwsound/movieaudiofactory.hpp +++ b/apps/openmw/mwsound/movieaudiofactory.hpp @@ -1,7 +1,7 @@ #ifndef OPENMW_MWSOUND_MOVIEAUDIOFACTORY_H #define OPENMW_MWSOUND_MOVIEAUDIOFACTORY_H -#include +#include namespace MWSound { diff --git a/components/files/hash.cpp b/components/files/hash.cpp index 1f1839ed0c..2f5751ac97 100644 --- a/components/files/hash.cpp +++ b/components/files/hash.cpp @@ -1,6 +1,6 @@ #include "hash.hpp" -#include +#include #include #include diff --git a/extern/oics/CMakeLists.txt b/extern/oics/CMakeLists.txt index 2d34f3f3e6..0f19dd8541 100644 --- a/extern/oics/CMakeLists.txt +++ b/extern/oics/CMakeLists.txt @@ -5,18 +5,27 @@ add_library(oics STATIC ICSInputControlSystem_keyboard.cpp ICSInputControlSystem_mouse.cpp ICSInputControlSystem_joystick.cpp - ICSPrerequisites.h + include/oics/ICSChannel.h + include/oics/ICSChannelListener.h + include/oics/ICSControl.h + include/oics/ICSControlListener.h + include/oics/ICSInputControlSystem.h + include/oics/ICSPrerequisites.h ) +target_include_directories(oics PUBLIC include) +target_include_directories(oics PRIVATE include/oics) + if(USE_SYSTEM_TINYXML) target_link_libraries(oics ${TinyXML_LIBRARIES}) else() add_library(local_tinyxml STATIC - tinyxml.cpp - tinyxmlparser.cpp - tinyxmlerror.cpp - tinystr.cpp + tinyxml/tinyxml.cpp + tinyxml/tinyxmlparser.cpp + tinyxml/tinyxmlerror.cpp + tinyxml/tinystr.cpp ) + target_include_directories(local_tinyxml PUBLIC tinyxml) target_link_libraries(oics local_tinyxml) endif() diff --git a/extern/oics/ICSChannel.h b/extern/oics/include/oics/ICSChannel.h similarity index 100% rename from extern/oics/ICSChannel.h rename to extern/oics/include/oics/ICSChannel.h diff --git a/extern/oics/ICSChannelListener.h b/extern/oics/include/oics/ICSChannelListener.h similarity index 100% rename from extern/oics/ICSChannelListener.h rename to extern/oics/include/oics/ICSChannelListener.h diff --git a/extern/oics/ICSControl.h b/extern/oics/include/oics/ICSControl.h similarity index 100% rename from extern/oics/ICSControl.h rename to extern/oics/include/oics/ICSControl.h diff --git a/extern/oics/ICSControlListener.h b/extern/oics/include/oics/ICSControlListener.h similarity index 100% rename from extern/oics/ICSControlListener.h rename to extern/oics/include/oics/ICSControlListener.h diff --git a/extern/oics/ICSInputControlSystem.h b/extern/oics/include/oics/ICSInputControlSystem.h similarity index 100% rename from extern/oics/ICSInputControlSystem.h rename to extern/oics/include/oics/ICSInputControlSystem.h diff --git a/extern/oics/ICSPrerequisites.h b/extern/oics/include/oics/ICSPrerequisites.h similarity index 100% rename from extern/oics/ICSPrerequisites.h rename to extern/oics/include/oics/ICSPrerequisites.h diff --git a/extern/oics/tinystr.cpp b/extern/oics/tinyxml/tinystr.cpp similarity index 100% rename from extern/oics/tinystr.cpp rename to extern/oics/tinyxml/tinystr.cpp diff --git a/extern/oics/tinystr.h b/extern/oics/tinyxml/tinystr.h similarity index 100% rename from extern/oics/tinystr.h rename to extern/oics/tinyxml/tinystr.h diff --git a/extern/oics/tinyxml.cpp b/extern/oics/tinyxml/tinyxml.cpp similarity index 100% rename from extern/oics/tinyxml.cpp rename to extern/oics/tinyxml/tinyxml.cpp diff --git a/extern/oics/tinyxml.h b/extern/oics/tinyxml/tinyxml.h similarity index 100% rename from extern/oics/tinyxml.h rename to extern/oics/tinyxml/tinyxml.h diff --git a/extern/oics/tinyxmlerror.cpp b/extern/oics/tinyxml/tinyxmlerror.cpp similarity index 100% rename from extern/oics/tinyxmlerror.cpp rename to extern/oics/tinyxml/tinyxmlerror.cpp diff --git a/extern/oics/tinyxmlparser.cpp b/extern/oics/tinyxml/tinyxmlparser.cpp similarity index 100% rename from extern/oics/tinyxmlparser.cpp rename to extern/oics/tinyxml/tinyxmlparser.cpp diff --git a/extern/osg-ffmpeg-videoplayer/CMakeLists.txt b/extern/osg-ffmpeg-videoplayer/CMakeLists.txt index 8ff608bf04..3b3ff0184d 100644 --- a/extern/osg-ffmpeg-videoplayer/CMakeLists.txt +++ b/extern/osg-ffmpeg-videoplayer/CMakeLists.txt @@ -5,18 +5,23 @@ set(OSG_FFMPEG_VIDEOPLAYER_LIBRARY "osg-ffmpeg-videoplayer") set(OSG_FFMPEG_VIDEOPLAYER_SOURCE_FILES videoplayer.cpp videostate.cpp - videodefs.hpp audiodecoder.cpp - audiofactory.hpp + include/osg-ffmpeg-videoplayer/audiodecoder.hpp + include/osg-ffmpeg-videoplayer/audiofactory.hpp + include/osg-ffmpeg-videoplayer/libavformatdefines.hpp + include/osg-ffmpeg-videoplayer/libavutildefines.hpp + include/osg-ffmpeg-videoplayer/videodefs.hpp + include/osg-ffmpeg-videoplayer/videoplayer.hpp + include/osg-ffmpeg-videoplayer/videostate.hpp ) -include_directories(${FFmpeg_INCLUDE_DIRS}) add_library(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} STATIC ${OSG_FFMPEG_VIDEOPLAYER_SOURCE_FILES}) target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} ${FFmpeg_LIBRARIES}) target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} ${OSG_LIBRARIES}) target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} SDL2::SDL2) -link_directories(${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} PUBLIC include ${FFmpeg_INCLUDE_DIRS}) +target_include_directories(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} PRIVATE include/osg-ffmpeg-videoplayer) if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC) target_precompile_headers(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} PUBLIC diff --git a/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp b/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp index 9a48dff459..db3f8dc2f0 100644 --- a/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp +++ b/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp @@ -1,7 +1,5 @@ #include "audiodecoder.hpp" -#include - #include #include #include @@ -24,6 +22,7 @@ extern "C" #include #endif +#include "libavutildefines.hpp" #include "videostate.hpp" namespace diff --git a/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/audiodecoder.hpp similarity index 98% rename from extern/osg-ffmpeg-videoplayer/audiodecoder.hpp rename to extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/audiodecoder.hpp index 250ba1db64..a89dca8cd7 100644 --- a/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp +++ b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/audiodecoder.hpp @@ -6,7 +6,7 @@ #include #include -#include +#include #if defined(_MSC_VER) #pragma warning (push) diff --git a/extern/osg-ffmpeg-videoplayer/audiofactory.hpp b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/audiofactory.hpp similarity index 100% rename from extern/osg-ffmpeg-videoplayer/audiofactory.hpp rename to extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/audiofactory.hpp diff --git a/extern/osg-ffmpeg-videoplayer/libavformatdefines.hpp b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/libavformatdefines.hpp similarity index 100% rename from extern/osg-ffmpeg-videoplayer/libavformatdefines.hpp rename to extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/libavformatdefines.hpp diff --git a/extern/osg-ffmpeg-videoplayer/libavutildefines.hpp b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/libavutildefines.hpp similarity index 100% rename from extern/osg-ffmpeg-videoplayer/libavutildefines.hpp rename to extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/libavutildefines.hpp diff --git a/extern/osg-ffmpeg-videoplayer/videodefs.hpp b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/videodefs.hpp similarity index 100% rename from extern/osg-ffmpeg-videoplayer/videodefs.hpp rename to extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/videodefs.hpp diff --git a/extern/osg-ffmpeg-videoplayer/videoplayer.hpp b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/videoplayer.hpp similarity index 100% rename from extern/osg-ffmpeg-videoplayer/videoplayer.hpp rename to extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/videoplayer.hpp diff --git a/extern/osg-ffmpeg-videoplayer/videostate.hpp b/extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/videostate.hpp similarity index 100% rename from extern/osg-ffmpeg-videoplayer/videostate.hpp rename to extern/osg-ffmpeg-videoplayer/include/osg-ffmpeg-videoplayer/videostate.hpp diff --git a/extern/osgQt/CMakeLists.txt b/extern/osgQt/CMakeLists.txt index 1cfb8230a3..3b7be3e042 100644 --- a/extern/osgQt/CMakeLists.txt +++ b/extern/osgQt/CMakeLists.txt @@ -3,8 +3,8 @@ set(OSGQT_LIBRARY "osgQt") # Sources set(SOURCE_H - osgQOpenGLWidget.hpp - CompositeOsgRenderer.hpp + include/osgQt/osgQOpenGLWidget.hpp + include/osgQt/CompositeOsgRenderer.hpp ) qt_wrap_cpp(SOURCES_H_MOC ${SOURCE_H} ) @@ -16,9 +16,9 @@ set(OSGQT_SOURCE_FILES ) add_library(${OSGQT_LIBRARY} STATIC ${OSGQT_SOURCE_FILES}) +target_include_directories(${OSGQT_LIBRARY} PUBLIC include) +target_include_directories(${OSGQT_LIBRARY} PRIVATE include/osgQt) target_link_libraries(${OSGQT_LIBRARY} Qt::Core Qt::OpenGL Qt::OpenGLWidgets) -link_directories(${CMAKE_CURRENT_BINARY_DIR}) - set(EXTERN_OSGQT_LIBRARY ${OSGQT_LIBRARY} PARENT_SCOPE) diff --git a/extern/osgQt/CompositeOsgRenderer.hpp b/extern/osgQt/include/osgQt/CompositeOsgRenderer.hpp similarity index 100% rename from extern/osgQt/CompositeOsgRenderer.hpp rename to extern/osgQt/include/osgQt/CompositeOsgRenderer.hpp diff --git a/extern/osgQt/osgQOpenGLWidget.hpp b/extern/osgQt/include/osgQt/osgQOpenGLWidget.hpp similarity index 100% rename from extern/osgQt/osgQOpenGLWidget.hpp rename to extern/osgQt/include/osgQt/osgQOpenGLWidget.hpp diff --git a/extern/smhasher/CMakeLists.txt b/extern/smhasher/CMakeLists.txt index ee03e6c38e..cf4208ede6 100644 --- a/extern/smhasher/CMakeLists.txt +++ b/extern/smhasher/CMakeLists.txt @@ -1,2 +1,3 @@ -add_library(smhasher STATIC MurmurHash3.cpp) -target_include_directories(smhasher INTERFACE .) +add_library(smhasher STATIC MurmurHash3.cpp include/smhasher/MurmurHash3.h) +target_include_directories(smhasher PUBLIC include) +target_include_directories(smhasher PRIVATE include/smhasher) diff --git a/extern/smhasher/MurmurHash3.h b/extern/smhasher/include/smhasher/MurmurHash3.h similarity index 100% rename from extern/smhasher/MurmurHash3.h rename to extern/smhasher/include/smhasher/MurmurHash3.h