48 lines
2.1 KiB
Diff
48 lines
2.1 KiB
Diff
diff --git a/swiftpm/CMakeLists.txt b/swiftpm/CMakeLists.txt
|
|
index 4cd8621f..86a23e0a 100644
|
|
--- a/swiftpm/CMakeLists.txt
|
|
+++ b/swiftpm/CMakeLists.txt
|
|
@@ -26,7 +26,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
option(BUILD_SHARED_LIBS "Build shared libraryes by default" YES)
|
|
|
|
-find_package(TSC CONFIG REQUIRED)
|
|
+if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL Android)
|
|
+ find_package(TSC CONFIG REQUIRED)
|
|
+endif()
|
|
|
|
find_package(LLBuild CONFIG)
|
|
if(NOT LLBuild_FOUND)
|
|
diff --git a/swiftpm/Sources/PackageDescription/CMakeLists.txt b/swiftpm/Sources/PackageDescription/CMakeLists.txt
|
|
index b6d925e1..3e546554 100644
|
|
--- a/swiftpm/Sources/PackageDescription/CMakeLists.txt
|
|
+++ b/swiftpm/Sources/PackageDescription/CMakeLists.txt
|
|
@@ -32,11 +32,13 @@ foreach(PACKAGE_DESCRIPTION_VERSION 4 4_2)
|
|
target_link_options(PD${PACKAGE_DESCRIPTION_VERSION} PRIVATE
|
|
"SHELL:-Xlinker -install_name -Xlinker @rpath/libPackageDescription.dylib")
|
|
endif()
|
|
-
|
|
+ target_link_options(PD${PACKAGE_DESCRIPTION_VERSION} PRIVATE "SHELL:-no-toolchain-stdlib-rpath")
|
|
set_target_properties(PD${PACKAGE_DESCRIPTION_VERSION} PROPERTIES
|
|
Swift_MODULE_NAME PackageDescription
|
|
Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/pm/${PACKAGE_DESCRIPTION_VERSION}
|
|
+ BUILD_WITH_INSTALL_RPATH TRUE
|
|
INSTALL_NAME_DIR \\@rpath
|
|
+ INSTALL_RPATH "$ORIGIN/../../android"
|
|
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/${PACKAGE_DESCRIPTION_VERSION}
|
|
OUTPUT_NAME PackageDescription
|
|
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/${PACKAGE_DESCRIPTION_VERSION}
|
|
diff --git a/swiftpm/TSC/Sources/TSCBasic/CMakeLists.txt b/swiftpm/TSC/Sources/TSCBasic/CMakeLists.txt
|
|
index 50e1ba60..e47b87e7 100644
|
|
--- a/swiftpm/TSC/Sources/TSCBasic/CMakeLists.txt
|
|
+++ b/swiftpm/TSC/Sources/TSCBasic/CMakeLists.txt
|
|
@@ -53,7 +53,7 @@ target_link_libraries(TSCBasic PUBLIC
|
|
TSCLibc)
|
|
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
|
target_link_libraries(TSCBasic PUBLIC
|
|
- Foundation)
|
|
+ Foundation android-spawn)
|
|
endif()
|
|
# NOTE(compnerd) workaround for CMake not setting up include flags yet
|
|
set_target_properties(TSCBasic PROPERTIES
|