diff --git a/CMakeLists.txt b/CMakeLists.txt index 90b48c26..0c85e417 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -471,11 +471,10 @@ add_library(MayoIO STATIC ${MayoIO_HeaderFiles} ${MayoIO_SourceFiles}) target_include_directories(MayoIO PRIVATE ${Mayo_IncludeDirectories}) target_compile_definitions(MayoIO PRIVATE ${Mayo_CompileDefinitions}) target_compile_options(MayoIO PRIVATE ${Mayo_CompileOptions}) -target_link_libraries(MayoIO PRIVATE ${MayoIO_LinkLibraries}) +target_link_libraries(MayoIO PRIVATE MayoCore ${MayoIO_LinkLibraries}) add_library(MayoIOLib INTERFACE) -target_link_libraries(MayoIOLib INTERFACE MayoIO ${MayoIO_LinkLibraries}) -target_include_directories(MayoIOLib INTERFACE ${Mayo_IncludeDirectories}) +target_link_libraries(MayoIOLib INTERFACE MayoIO MayoCoreLib ${MayoIO_LinkLibraries}) ########## # Target: MayoApp @@ -555,6 +554,8 @@ if(Mayo_BuildApp) target_compile_definitions(mayo PRIVATE ${Mayo_CompileDefinitions}) target_compile_options(mayo PRIVATE ${Mayo_CompileOptions}) target_link_libraries(mayo PRIVATE ${MayoApp_LinkLibraries}) + # Required by generated Qt UI files + target_include_directories(mayo PRIVATE ${PROJECT_SOURCE_DIR}/src/app) set_target_properties( mayo diff --git a/src/graphics/graphics_utils.cpp b/src/graphics/graphics_utils.cpp index f44e89ce..84cfea4c 100644 --- a/src/graphics/graphics_utils.cpp +++ b/src/graphics/graphics_utils.cpp @@ -10,6 +10,7 @@ #include "../base/math_utils.h" #include "../base/tkernel_utils.h" +#include #include #include #include @@ -206,7 +207,7 @@ int GraphicsUtils::AspectWindow_height(const Handle_Aspect_Window& wnd) return h; } -Handle_Aspect_DisplayConnection GraphicsUtils::AspectDisplayConnection_create() +OccHandle GraphicsUtils::AspectDisplayConnection_create() { #if (!defined(MAYO_OS_WINDOWS) && (!defined(MAYO_OS_MAC) || defined(MACOSX_USE_GLX))) return new Aspect_DisplayConnection(std::getenv("DISPLAY")); diff --git a/src/graphics/graphics_utils.h b/src/graphics/graphics_utils.h index b0913aff..256201c3 100644 --- a/src/graphics/graphics_utils.h +++ b/src/graphics/graphics_utils.h @@ -6,15 +6,19 @@ #pragma once +#include "../base/occ_handle.h" #include "graphics_object_ptr.h" #include #include -#include #include #include #include #include class Image_PixMap; +// Note: can't include Aspect_DisplayConnection.hxx as this is causing name conflicts +// with XLib in other files(with GraphicsObjectDriver::Support::None) +// This seems to happen only for OpenCascade <= v7.5 +class Aspect_DisplayConnection; namespace Mayo { @@ -51,7 +55,7 @@ struct GraphicsUtils { static int AspectWindow_width(const Handle_Aspect_Window& wnd); static int AspectWindow_height(const Handle_Aspect_Window& wnd); - static Handle_Aspect_DisplayConnection AspectDisplayConnection_create(); + static OccHandle AspectDisplayConnection_create(); static void Gfx3dClipPlane_setCappingHatch( const Handle_Graphic3d_ClipPlane& plane, Aspect_HatchStyle hatch diff --git a/src/qtbackend/qt_app_translator.cpp b/src/qtbackend/qt_app_translator.cpp index 073c160f..64a6c329 100644 --- a/src/qtbackend/qt_app_translator.cpp +++ b/src/qtbackend/qt_app_translator.cpp @@ -4,8 +4,6 @@ ** See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt ****************************************************************************/ -#pragma once - #include "qt_app_translator.h" #include