Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Migliore
VTK
Commits
546d4c9a
Commit
546d4c9a
authored
1 year ago
by
Ben Boeckel
Browse files
Options
Downloads
Patches
Plain Diff
Examples/QML: fix CMake command style
parent
6b3e195a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/GUI/QML/Common.cmake
+12
-12
12 additions, 12 deletions
Examples/GUI/QML/Common.cmake
with
12 additions
and
12 deletions
Examples/GUI/QML/Common.cmake
+
12
−
12
View file @
546d4c9a
...
...
@@ -11,13 +11,13 @@ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Quick)
find_package
(
Qt
${
QT_VERSION_MAJOR
}
REQUIRED COMPONENTS Core Quick
)
if
(
NOT
"
${
Qt5_DIR
}
"
STREQUAL
""
)
message
(
STATUS
"Qt5_DIR:"
${
Qt5_DIR
}
)
message
(
STATUS
"Qt5_DIR:"
${
Qt5_DIR
}
)
elseif
(
NOT
"
${
Qt6_DIR
}
"
STREQUAL
""
)
message
(
STATUS
"Qt6_DIR:"
${
Qt6_DIR
}
)
endif
()
message
(
STATUS
"QT_VERSION: Qt
${
QT_VERSION_MAJOR
}
"
)
message
(
STATUS
"Qt6_DIR:"
${
Qt6_DIR
}
)
endif
()
message
(
STATUS
"QT_VERSION: Qt
${
QT_VERSION_MAJOR
}
"
)
if
(
${
QT_VERSION_MAJOR
}
GREATER_EQUAL 6
)
if
(
${
QT_VERSION_MAJOR
}
GREATER_EQUAL 6
)
qt_add_executable
(
${
MYNAME
}
MANUAL_FINALIZATION
${
PROJECT_SOURCES
}
...
...
@@ -26,19 +26,19 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
# set_property(TARGET ${MYNAME} APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
else
()
if
(
ANDROID
)
else
()
if
(
ANDROID
)
add_library
(
${
MYNAME
}
SHARED
${
PROJECT_SOURCES
}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else
()
else
()
add_executable
(
${
MYNAME
}
${
PROJECT_SOURCES
}
)
endif
()
endif
()
endif
()
endif
()
target_compile_definitions
(
${
MYNAME
}
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
...
...
@@ -59,7 +59,7 @@ install(TARGETS ${MYNAME}
BUNDLE DESTINATION .
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
if
(
QT_VERSION_MAJOR EQUAL 6
)
if
(
QT_VERSION_MAJOR EQUAL 6
)
qt_import_qml_plugins
(
${
MYNAME
}
)
qt_finalize_executable
(
${
MYNAME
}
)
endif
()
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment