mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
format cmake files
This commit is contained in:
+19
-18
@@ -21,7 +21,15 @@ message("Running CMakeLists.txt in /src/qtviewer")
|
||||
|
||||
# Specify the Qt version and components to use
|
||||
set(QT_VERSION 6 CACHE STRING "Qt version")
|
||||
set(QT_COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets CACHE STRING "Qt components")
|
||||
set(QT_COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
OpenGL
|
||||
OpenGLWidgets
|
||||
Widgets
|
||||
CACHE STRING
|
||||
"Qt components"
|
||||
)
|
||||
|
||||
find_package(Qt${QT_VERSION} COMPONENTS ${QT_COMPONENTS} REQUIRED PATHS ${QT_DIR})
|
||||
|
||||
@@ -45,10 +53,7 @@ set(targetName "QtViewer")
|
||||
# Scan for .qrc files and add to build process
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(RESOURCE_FILES
|
||||
resources/qt_resources.qrc
|
||||
resources/qt_res.rc
|
||||
)
|
||||
set(RESOURCE_FILES resources/qt_resources.qrc resources/qt_res.rc)
|
||||
|
||||
# The MACOSX_BUNDLE_ICON_FILE variable is added to the Info.plist
|
||||
# generated by CMake. This variable contains the .icns file name,
|
||||
@@ -57,10 +62,10 @@ set(MACOSX_BUNDLE_ICON_FILE ifcosLogo.icns)
|
||||
|
||||
# The following tells CMake where to find and install the file itself.
|
||||
set(app_icon_macos "resources/ifcosLogo.icns")
|
||||
set_source_files_properties(${app_icon_macos} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION "Resources")
|
||||
set_source_files_properties(${app_icon_macos} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
||||
add_executable(${targetName}
|
||||
add_executable(
|
||||
${targetName}
|
||||
MessageLogger.h
|
||||
IfcViewerWidget.h
|
||||
IfcViewerWidget.cpp
|
||||
@@ -73,14 +78,13 @@ add_executable(${targetName}
|
||||
${app_icon_macos}
|
||||
)
|
||||
|
||||
set_target_properties(${targetName} PROPERTIES
|
||||
AUTOMOC On
|
||||
WIN32_EXECUTABLE ON
|
||||
MACOSX_BUNDLE ON
|
||||
RESOURCE "${RESOURCE_FILES}"
|
||||
set_target_properties(
|
||||
${targetName}
|
||||
PROPERTIES AUTOMOC On WIN32_EXECUTABLE ON MACOSX_BUNDLE ON RESOURCE "${RESOURCE_FILES}"
|
||||
)
|
||||
|
||||
target_link_libraries(${targetName}
|
||||
target_link_libraries(
|
||||
${targetName}
|
||||
${IFCOPENSHELL_LIBRARIES}
|
||||
${OpenCASCADE_LIBRARIES}
|
||||
${OPENSCENEGRAPH_LIBRARIES}
|
||||
@@ -91,10 +95,7 @@ target_link_libraries(${targetName}
|
||||
Qt${QT_VERSION}::Widgets
|
||||
)
|
||||
|
||||
target_include_directories(${targetName} PUBLIC
|
||||
${QT_DIR}/include
|
||||
${OPENSCENEGRAPH_INCLUDE_DIRS}
|
||||
)
|
||||
target_include_directories(${targetName} PUBLIC ${QT_DIR}/include ${OPENSCENEGRAPH_INCLUDE_DIRS})
|
||||
|
||||
get_target_property(targetIncludeDirs ${targetName} INCLUDE_DIRECTORIES)
|
||||
message(STATUS "target_include_directories: ${targetIncludeDirs}")
|
||||
|
||||
Reference in New Issue
Block a user