diff --git a/.clangd b/.clangd new file mode 100644 index 0000000000..9fd07686ae --- /dev/null +++ b/.clangd @@ -0,0 +1,5 @@ +{ + "compile_flags": [ + "-I/opt/homebrew/Cellar/qt/6.5.1_2/include" + ] +} diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000000..73ce2689ae --- /dev/null +++ b/generate.sh @@ -0,0 +1,15 @@ +cmake ../cmake \ + -DPYTHON_EXECUTABLE=/opt/homebrew/bin/python3 \ + -DPYTHON_LIBRARY=/opt/homebrew/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib \ + -DPYTHON_INCLUDE_DIR=/opt/homebrew/Frameworks/Python.framework/Versions/3.11/include/python3.11/ \ + -DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_1/lib/ \ + -DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_1/include/opencascade/ \ + -DCGAL_INCLUDE_DIR=/opt/homebrew/include/ \ + -DGMP_LIBRARY_DIR=/opt/homebrew/lib/ \ + -DMPFR_LIBRARY_DIR=/opt/homebrew/lib/ \ + -DHDF5_LIBRARY_DIR=/opt/homebrew/lib/ \ + -DHDF5_INCLUDE_DIR=/opt/homebrew/include/ \ + -DCOLLADA_SUPPORT=OFF \ + -DBUILD_QTVIEWER=ON \ + -DQT_DIR=/opt/homebrew/Cellar/qt/6.5.1_2 \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=true diff --git a/src/qtviewer/CMakeLists.txt b/src/qtviewer/CMakeLists.txt index bce0fbcedf..f8da024edb 100644 --- a/src/qtviewer/CMakeLists.txt +++ b/src/qtviewer/CMakeLists.txt @@ -33,6 +33,13 @@ endif() set(targetName "QtViewer") +# Scan for .qrc files and add to build process +set(CMAKE_AUTORCC ON) + +set(RESOURCE_FILES + resources/qt_resources.qrc +) + add_executable(${targetName} IfcViewerWidget.h IfcViewerWidget.cpp @@ -47,6 +54,7 @@ set_target_properties(${targetName} PROPERTIES AUTOMOC On WIN32_EXECUTABLE ON MACOSX_BUNDLE ON + RESOURCE "${RESOURCE_FILES}" ) target_link_libraries(${targetName} @@ -64,4 +72,4 @@ target_include_directories(${targetName} PUBLIC ) get_target_property(targetIncludeDirs ${targetName} INCLUDE_DIRECTORIES) -message(STATUS "target_include_directories: ${targetIncludeDirs}") \ No newline at end of file +message(STATUS "target_include_directories: ${targetIncludeDirs}") diff --git a/src/qtviewer/main.cpp b/src/qtviewer/main.cpp index b65d413813..a6af906d00 100644 --- a/src/qtviewer/main.cpp +++ b/src/qtviewer/main.cpp @@ -6,7 +6,11 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); + QIcon appIcon(":/resources/ifcopenshell_logo.png"); + MainWindow window; + + window.setWindowIcon(appIcon); window.show(); return app.exec(); diff --git a/src/qtviewer/resources/ifcopenshell_logo.ico b/src/qtviewer/resources/ifcopenshell_logo.ico new file mode 100644 index 0000000000..5414ae3971 Binary files /dev/null and b/src/qtviewer/resources/ifcopenshell_logo.ico differ diff --git a/src/qtviewer/resources/ifcopenshell_logo.png b/src/qtviewer/resources/ifcopenshell_logo.png new file mode 100644 index 0000000000..ac9394a243 Binary files /dev/null and b/src/qtviewer/resources/ifcopenshell_logo.png differ diff --git a/src/qtviewer/resources/qt_resources.qrc b/src/qtviewer/resources/qt_resources.qrc new file mode 100644 index 0000000000..97d832449d --- /dev/null +++ b/src/qtviewer/resources/qt_resources.qrc @@ -0,0 +1,6 @@ + + + ifcopenshell_logo.png + ifcopenshell_logo.ico + +