mirror of
https://github.com/MAGICGrants/flutter_libsparkmobile.git
synced 2026-01-09 04:58:02 -05:00
linux bundling fixes
This commit is contained in:
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# Project-level configuration.
|
||||
set(PROJECT_NAME "flutter_libsparkmobile")
|
||||
set(PROJECT_SYSTEM_NAME "linux")
|
||||
set(BUILD_FOR_SYSTEM_NAME "linux")
|
||||
|
||||
project(${PROJECT_NAME} LANGUAGES CXX)
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
|
||||
project(sparkmobile)
|
||||
|
||||
if(BUILD_FOR_SYSTEM_NAME STREQUAL "linux")
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
endif()
|
||||
|
||||
set(OPENSSL_USE_STATIC_LIBS OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(BUILD_FOR_SYSTEM_NAME STREQUAL "macos" OR BUILD_FOR_SYSTEM_NAME STREQUAL "ios")
|
||||
@@ -68,7 +72,7 @@ set_property(SOURCE src/spark.cpp
|
||||
|
||||
LINK_DIRECTORIES(${OPENSSL_LIBRARIES_DIR})
|
||||
|
||||
if(BUILD_FOR_SYSTEM_NAME STREQUAL "ios")
|
||||
if(BUILD_FOR_SYSTEM_NAME STREQUAL "ios" OR BUILD_FOR_SYSTEM_NAME STREQUAL "linux")
|
||||
SET(CUSTOM_LIB_TYPE STATIC)
|
||||
else()
|
||||
SET(CUSTOM_LIB_TYPE SHARED)
|
||||
|
||||
Reference in New Issue
Block a user