Commit 6434f092 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Add ability to add custom library prefix/suffix.

Since QtTesting is often part of other projects, we add mechanism to
allow those projects to add prefix/suffix to the QtTesting library.
parent 8f55f075
......@@ -52,6 +52,16 @@ IF(NOT QT_TESTING_INSTALL_EXPORT_NAME)
SET(QT_TESTING_INSTALL_EXPORT_NAME QtTestingTargets)
ENDIF()
# One can define QT_TESTING_CUSTOM_LIBRARY_PREFIX and/or
# QT_TESTING_CUSTOM_LIBRARY_SUFFIX to add prefix/suffix to libraries
# generated by thus project. Default is empty.
if(NOT DEFINED QT_TESTING_CUSTOM_LIBRARY_SUFFIX)
set(QT_TESTING_CUSTOM_LIBRARY_SUFFIX)
endif()
if(NOT DEFINED QT_TESTING_CUSTOM_LIBRARY_PREFIX)
set(QT_TESTING_CUSTOM_LIBRARY_PREFIX)
endif()
IF(QT_TESTING_WITH_PYTHON)
IF(NOT PythonLibs_FOUND)
......@@ -299,6 +309,10 @@ ADD_LIBRARY(QtTesting
${PYTHON_SRCS}
)
# Set library name to include custom prefixes/suffixes.
set_property(TARGET QtTesting
PROPERTY OUTPUT_NAME ${QT_TESTING_CUSTOM_LIBRARY_PREFIX}QtTesting${QT_TESTING_CUSTOM_LIBRARY_SUFFIX})
SOURCE_GROUP("Generated" FILES
${MOC_BUILT_SOURCES}
${UI_BUILT_SOURCES}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment