diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index ecadec689b..a14239e9ae 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -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 diff --git a/src/corelib/plugin/qmachparser.cpp b/src/corelib/plugin/qmachparser.cpp index 82dc4bf1c2..f864f2610e 100644 --- a/src/corelib/plugin/qmachparser.cpp +++ b/src/corelib/plugin/qmachparser.cpp @@ -39,8 +39,6 @@ #include "qmachparser_p.h" -#if defined(Q_OF_MACH_O) - #include #include @@ -213,5 +211,3 @@ QLibraryScanResult QMachOParser::parse(const char *m_s, ulong fdlen, QString *e } QT_END_NAMESPACE - -#endif