summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-02-15 16:40:08 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-02-25 07:55:43 +0100
commitbe6bf1a3133fcf469eac653cff3b8ef3a43eed7e (patch)
treea7a38d8839413041841c3bf6b69608f4cbdbeb00 /cmake
parent976d8b1f74d3fe556e4f468936affccbd3124247 (diff)
Remove INTERNAL argument from qt_internal_add_linker_version_script
The code branch for the INTERNAL argument did nothing, and we never call qt_internal_add_linker_version_script with INTERNAL. Change-Id: Ie369b4dac29cd1a977433ebfd662c198a3e1d0f2 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake64
1 files changed, 30 insertions, 34 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index 9af05d5907..003e1a45ec 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -1,48 +1,44 @@
function(qt_internal_add_linker_version_script target)
- qt_parse_all_arguments(arg "qt_internal_add_linker" "INTERNAL" "" "PRIVATE_HEADERS" ${ARGN})
+ qt_parse_all_arguments(arg "qt_internal_add_linker" "" "" "PRIVATE_HEADERS" ${ARGN})
if (TEST_ld_version_script)
- if (arg_INTERNAL)
- set(contents "Qt_${PROJECT_VERSION_MAJOR}_PRIVATE_API { *; };")
+ set(contents "Qt_${PROJECT_VERSION_MAJOR}_PRIVATE_API {\n qt_private_api_tag*;\n")
+ foreach(ph ${arg_PRIVATE_HEADERS})
+ string(APPEND contents " @FILE:${ph}@\n")
+ endforeach()
+ string(APPEND contents "};\n")
+ set(current "Qt_${PROJECT_VERSION_MAJOR}")
+ if (QT_NAMESPACE STREQUAL "")
+ set(tag_symbol "qt_version_tag")
else()
- set(contents "Qt_${PROJECT_VERSION_MAJOR}_PRIVATE_API {\n qt_private_api_tag*;\n")
- foreach(ph ${arg_PRIVATE_HEADERS})
- string(APPEND contents " @FILE:${ph}@\n")
- endforeach()
- string(APPEND contents "};\n")
- set(current "Qt_${PROJECT_VERSION_MAJOR}")
- if (QT_NAMESPACE STREQUAL "")
- set(tag_symbol "qt_version_tag")
+ set(tag_symbol "qt_version_tag_${QT_NAMESPACE}")
+ endif()
+ string(APPEND contents "${current} { *; };\n")
+
+ foreach(minor_version RANGE ${PROJECT_VERSION_MINOR})
+ set(previous "${current}")
+ set(current "Qt_${PROJECT_VERSION_MAJOR}.${minor_version}")
+ if (minor_version EQUAL ${PROJECT_VERSION_MINOR})
+ string(APPEND contents "${current} { ${tag_symbol}; } ${previous};\n")
else()
- set(tag_symbol "qt_version_tag_${QT_NAMESPACE}")
+ string(APPEND contents "${current} {} ${previous};\n")
endif()
- string(APPEND contents "${current} { *; };\n")
-
- foreach(minor_version RANGE ${PROJECT_VERSION_MINOR})
- set(previous "${current}")
- set(current "Qt_${PROJECT_VERSION_MAJOR}.${minor_version}")
- if (minor_version EQUAL ${PROJECT_VERSION_MINOR})
- string(APPEND contents "${current} { ${tag_symbol}; } ${previous};\n")
- else()
- string(APPEND contents "${current} {} ${previous};\n")
- endif()
- endforeach()
+ endforeach()
- set(infile "${CMAKE_CURRENT_BINARY_DIR}/${target}.version.in")
- set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${target}.version")
+ set(infile "${CMAKE_CURRENT_BINARY_DIR}/${target}.version.in")
+ set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${target}.version")
- file(GENERATE OUTPUT "${infile}" CONTENT "${contents}")
+ file(GENERATE OUTPUT "${infile}" CONTENT "${contents}")
- qt_ensure_perl()
+ qt_ensure_perl()
- add_custom_command(TARGET "${target}" PRE_LINK
- COMMAND "${HOST_PERL}" "${QT_MKSPECS_DIR}/features/data/unix/findclasslist.pl" < "${infile}" > "${outfile}"
- BYPRODUCTS "${outfile}" DEPENDS "${infile}"
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMENT "Generating version linker script"
+ add_custom_command(TARGET "${target}" PRE_LINK
+ COMMAND "${HOST_PERL}" "${QT_MKSPECS_DIR}/features/data/unix/findclasslist.pl" < "${infile}" > "${outfile}"
+ BYPRODUCTS "${outfile}" DEPENDS "${infile}"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMENT "Generating version linker script"
)
- target_link_options("${target}" PRIVATE "-Wl,--version-script,${outfile}")
- endif()
+ target_link_options("${target}" PRIVATE "-Wl,--version-script,${outfile}")
endif()
endfunction()