CMake: reorganize the QT_FEATURE_library portion of CMakeLists.txt

No need to attempt to compile both qelfparser and qmachoparser in all
systems.

Change-Id: Iccb47e5527544b6fbd75fffd16b7ee5a1555a7a8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Thiago Macieira 2021-11-15 21:04:20 -08:00
parent 09c58614db
commit 235173175b
2 changed files with 10 additions and 12 deletions

View File

@ -1013,20 +1013,22 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_stringlistmodel
qt_internal_extend_target(Core CONDITION QT_FEATURE_library
SOURCES
plugin/qelfparser_p.cpp plugin/qelfparser_p.h
plugin/qlibrary.cpp plugin/qlibrary.h plugin/qlibrary_p.h
plugin/qmachparser.cpp plugin/qmachparser_p.h
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_library AND UNIX
SOURCES
plugin/qlibrary_unix.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_library AND WIN32
SOURCES
plugin/qlibrary_win.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_library AND APPLE
SOURCES
plugin/qlibrary_unix.cpp
plugin/qmachparser.cpp plugin/qmachparser_p.h
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_library AND UNIX AND NOT APPLE
SOURCES
plugin/qelfparser_p.cpp plugin/qelfparser_p.h
plugin/qlibrary_unix.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_dlopen AND QT_FEATURE_library
LIBRARIES

View File

@ -39,8 +39,6 @@
#include "qmachparser_p.h"
#if defined(Q_OF_MACH_O)
#include <qendian.h>
#include <mach-o/loader.h>
@ -213,5 +211,3 @@ QLibraryScanResult QMachOParser::parse(const char *m_s, ulong fdlen, QString *e
}
QT_END_NAMESPACE
#endif