aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2018-09-25 19:54:41 +0000
committerTheCharlatan <seb.kung@gmail.com>2018-09-25 23:05:16 +0200
commit6a78140863cbfc11dd4388901c913717f8ca4d17 (patch)
treeee55841767107539fde68c2fe58b089603c785a2 /CMakeLists.txt
parentMerge pull request #4435 (diff)
downloadmonero-6a78140863cbfc11dd4388901c913717f8ca4d17.tar.xz
Make depends use self built clang for darwin
The configure script in hidapi and libsodium tried to find clang in /usr/bin, even though the correct prefix was passed in. This sets the correct CC flag. This was previously undetected, because clang and the sdk where installed in the global environment. This also fixes a subsequent error, where IOKIT and CoreFoundation are not found, again for the reason stated above.
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 994d47691..75d8ba9c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -883,10 +883,14 @@ list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
if (HIDAPI_FOUND)
if (APPLE)
- find_library(COREFOUNDATION CoreFoundation)
- find_library(IOKIT IOKit)
- list(APPEND EXTRA_LIBRARIES ${IOKIT})
- list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
+ if(DEPENDS)
+ list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
+ else()
+ find_library(COREFOUNDATION CoreFoundation)
+ find_library(IOKIT IOKit)
+ list(APPEND EXTRA_LIBRARIES ${IOKIT})
+ list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
+ endif()
endif()
if (WIN32)
list(APPEND EXTRA_LIBRARIES setupapi)