Skip to content

Commit 323ff00

Browse files
leetalAlexander Widerberg
andauthored
Dev (#103)
* Added a shared build example for macOS as well * Improve compatibility with more generators (specifically milti-configuration generators like Ninja). * Refined the caching of variables * Lots of fixes. Cannot get the mac catalyst builds to work with the xcode generator, but works on all other tested generators. * Exclude the CMAKE_FIND_ROOT_PATH from macOS builds since it is really only useful when cross-compiling. Also, for other platforms, CMAKE_OSX_SYSROOT_INT is now APPENDED to the CMAKE_FIND_ROOT_PATH to allow users to set own custom paths first for custom find_library behaviours * Refined some xcode settings as well as fixed a few flaws with the macos builds skipping certain user-defined directories when using any of the find_* commands. * Fixes for watchos with latest additions * Added better comment about the symbol visibility * Exported OSX_ARCHITECTURES as a global property and updated the README to reflect the latest changes. Co-authored-by: Alexander Widerberg <[email protected]>
1 parent cfa6908 commit 323ff00

File tree

4 files changed

+298
-182
lines changed

4 files changed

+298
-182
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ jobs:
7474
osx_image: xcode12.2
7575
env:
7676
- PLATFORM=MAC DEPLOYMENT_TARGET=10.13
77+
- name: "Xcode version 12.2, Target macOS [x86_64] SDK 10.13 [shared example]"
78+
stage: "macOS builds"
79+
osx_image: xcode12.2
80+
env:
81+
- PLATFORM=MAC DEPLOYMENT_TARGET=10.13 -DBUILD_SHARED=1
7782
- name: "Xcode version 12.2, Target macOS on Apple Silicon [arm64] SDK 11.0 [allowed failure]"
7883
stage: "macOS builds"
7984
osx_image: xcode12.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ cmake --install . --config Release
7373

7474
`CMAKE_OSX_ARCHITECTURES` - Architectures being compiled for (generated from PLATFORM).
7575

76-
`APPLE_TARGET_TRIPLE` - Used by autoconf build systems. NOTE: If "`ARCHS` are overridden, this will **NOT** be set!
76+
`APPLE_TARGET_TRIPLE` - Used by autoconf build systems.
7777

7878
### Additional Options
7979
`-DENABLE_BITCODE=(BOOL)` - Enabled by default, specify FALSE or 0 to disable bitcode

example/example-lib/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ MESSAGE( STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} )
88
include(CheckCXXSymbolExists)
99
check_cxx_symbol_exists(kqueue sys/event.h HAVE_KQUEUE)
1010
if(NOT HAVE_KQUEUE)
11-
message(FATAL_ERROR "kqueue NOT found!")
11+
message(STATUS "kqueue NOT found!")
1212
else()
1313
message(STATUS "kqueue found!")
1414
endif()
1515

16-
find_library(HAVE_APPKIT AppKit)
17-
if (NOT HAVE_APPKIT)
16+
find_library(APPKIT_LIBRARY AppKit)
17+
if (NOT APPKIT_LIBRARY)
1818
message(STATUS "AppKit.framework NOT found!")
1919
else()
20-
message(STATUS "AppKit.framework found!")
20+
message(STATUS "AppKit.framework found! ${APPKIT_LIBRARY}")
2121
endif()
2222

23-
find_library(HAVE_UIKIT UIKit)
24-
if (NOT HAVE_UIKIT)
23+
find_library(UIKIT_LIBRARY UIKit)
24+
if (NOT UIKIT_LIBRARY)
2525
message(STATUS "UIKit.framework NOT found!")
2626
else()
27-
message(STATUS "UIKit.framework found!")
27+
message(STATUS "UIKit.framework found! ${UIKIT_LIBRARY}")
2828
endif()
2929

3030
# Hook up XCTest for the supported plaforms (all but WatchOS)

0 commit comments

Comments
 (0)