File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -13,25 +13,27 @@ else()
1313endif ()
1414
1515file (GLOB SOURCES *.h *.cpp *.qrc simplecpp/*.h simplecpp/*.cpp )
16+ # Explicitly exclude qtscript_masterinclude.h
1617list (REMOVE_ITEM SOURCES "${CMAKE_CURRENT_LIST_DIR} /qtscript_masterinclude.h" )
1718
1819add_executable (${PROJECT_NAME} )
19-
2020target_sources (${PROJECT_NAME} PRIVATE
2121 ${SOURCES}
2222)
2323
24+ set (QT5_COMPATIBILITY_LIBS "" )
25+ if (${QT_VERSION_MAJOR} VERSION_GREATER_EQUAL 6)
26+ set (QT5_COMPATIBILITY_LIBS Qt${QT_VERSION_MAJOR} ::Core5Compat)
27+ endif ()
28+
2429target_link_libraries (${PROJECT_NAME} PUBLIC
2530 Qt${QT_VERSION_MAJOR} ::Core
2631 Qt${QT_VERSION_MAJOR} ::Widgets
2732 Qt${QT_VERSION_MAJOR} ::Xml
33+ ${QT5_COMPATIBILITY_LIBS}
2834 rxx
2935)
3036
31- if (${QT_VERSION_MAJOR} VERSION_GREATER 5)
32- target_link_libraries (${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR} ::Core5Compat)
33- endif ()
34-
3537target_include_directories (${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR} )
3638target_include_directories (${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR} /simplecpp)
3739
You can’t perform that action at this time.
0 commit comments