Check if passing arguments with cmake work
This commit is contained in:
		
					parent
					
						
							
								24fa209f53
							
						
					
				
			
			
				commit
				
					
						e5a33a8d4a
					
				
			
		
					 2 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,12 @@
 | 
			
		|||
cmake_minimum_required(VERSION 3.6)
 | 
			
		||||
project(flutter_openssl_crypto)
 | 
			
		||||
find_package(OpenSSL REQUIRED)
 | 
			
		||||
if(OPENSSL_FOUND)
 | 
			
		||||
  message("OpenSSL found:")
 | 
			
		||||
  message("   Includes: ${OPENSSL_INCLUDE_DIR}")
 | 
			
		||||
  message("   Libraries: ${OPENSSL_CRYPTO_LIBRARY}")
 | 
			
		||||
else()
 | 
			
		||||
  message(FATAL_ERROR "OpenSSL not found")
 | 
			
		||||
endif()
 | 
			
		||||
add_library(${PROJECT_NAME} SHARED empty.c)
 | 
			
		||||
target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::Crypto)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,6 +36,7 @@ android {
 | 
			
		|||
        externalNativeBuild {
 | 
			
		||||
            cmake {
 | 
			
		||||
                arguments "-DANDROID_STL=c++_shared"
 | 
			
		||||
                arguments "-DOPENSSL_ROOT_DIR=/usr/lib/openssl-1.1", "-DOPENSSL_CRYPTO_LIBRARY=/usr/lib/openssl-1.1/libcrypto.so", "-DOPENSSL_INCLUDE_DIR=/usr/include/openssl-1.1/openssl"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue