From 500343488513464b7d5afee1e234e86c921e7b4b Mon Sep 17 00:00:00 2001 From: TrustedUser Date: Fri, 17 Apr 2020 01:59:01 -0700 Subject: [PATCH] =?UTF-8?q?=C2=A8fix:=20osc=20cmake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 229457852..3da7093b1 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -377,7 +377,6 @@ if (APPLE) message("Apple device detected.") set(ADDITIONAL_SRC src/util_darwin.h src/util_darwin.m ${ADDITIONAL_SRC}) set(ADDITIONAL_LNK "-framework Foundation" "-framework AppKit") - set_target_properties(proxmark3 PROPERTIES LINK_FLAGS "-Wl,-F/Library/Frameworks") endif (APPLE) if (MINGW) @@ -395,16 +394,19 @@ if(NOT Qt5_FOUND) endif(NOT Qt5_FOUND) if (Qt5_FOUND) message("Qt5 library found, building gui :)") + + add_custom_command(OUTPUT src/proxguiqt.moc.cpp + COMMAND "$(MOC) -o src/proxguiqt.moc.cpp proxguiqt.h" + COMMENT "Creating src/proxguiqt.moc.cpp" + ) + set (TARGET_SOURCES src/proxgui.cpp src/proxgui.h src/proxguiqt.cpp src/proxguiqt.h ${TARGET_SOURCES}) - add_custom_command(OUTPUT src/proxguiqt.moc.cpp - COMMAND "$(MOC) -o src/proxguiqt.moc.cpp proxguiqt.h" - COMMENT "Creating src/proxguiqt.moc.cpp" - ) + add_definitions("-DHAVE_GUI") set(ADDITIONAL_LNK Qt5::Core Qt5::Widgets Qt5::Gui ${ADDITIONAL_LNK}) endif (Qt5_FOUND) @@ -415,6 +417,11 @@ add_executable( ${ADDITIONAL_SRC} ) +if (APPLE) + set_target_properties(proxmark3 PROPERTIES LINK_FLAGS "-Wl,-F/Library/Frameworks") +endif (APPLE) + + find_library(jansson REQUIRED) find_library(tinycbor REQUIRED) find_library(lua REQUIRED)