Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build function overwriter only on Windows and Mac. #24

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ set(gammaray_srcs
propertyeditor/propertypaletteeditor.cpp
propertyeditor/palettedialog.cpp

hooking/abstractfunctionoverwriter.cpp
hooking/functionoverwriterfactory.cpp
hooking/winfunctionoverwriter.cpp
hooking/unixfunctionoverwriter.cpp

tools/modelinspector/modeltester.cpp
tools/modelinspector/modelmodel.cpp
tools/modelinspector/modelcellmodel.cpp
Expand Down Expand Up @@ -107,6 +102,16 @@ set(gammaray_srcs
tools/styleinspector/dynamicproxystyle.cpp
)

if(WIN32 OR APPLE)
set(gammaray_srcs
${gammaray_srcs}
hooking/abstractfunctionoverwriter.cpp
hooking/functionoverwriterfactory.cpp
hooking/winfunctionoverwriter.cpp
hooking/unixfunctionoverwriter.cpp
)
endif()

if(HAVE_PRIVATE_QT_HEADERS)
set(gammaray_srcs
${gammaray_srcs}
Expand Down
2 changes: 2 additions & 0 deletions core/probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ Q_DECL_EXPORT const char *myFlagLocation(const char *method)
}
#endif

#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
void overwriteQtFunctions()
{
functionsOverwritten = true;
Expand Down Expand Up @@ -748,6 +749,7 @@ void overwriteQtFunctions()
#endif
#endif
}
#endif

#ifdef Q_OS_WIN
extern "C" Q_DECL_EXPORT void gammaray_probe_inject();
Expand Down