mirror of
				https://github.com/ton-blockchain/ton
				synced 2025-03-09 15:40:10 +00:00 
			
		
		
		
	Use BUILD_SHARED_LIBS to decide whether to build libemulator.so (#671)
* Update ubuntu:20.04 dockerfile (#636) * Update Dockerfile * Update Dockerfile --------- Co-authored-by: neodiX42 <neodiX@ton.org> * Use BUILD_SHARED_LIBS to decide whether to build libemulator.so --------- Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com> Co-authored-by: neodiX42 <neodiX@ton.org>
This commit is contained in:
		
							parent
							
								
									1d9e5d3672
								
							
						
					
					
						commit
						aab1fe0751
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -1,5 +1,7 @@ | |||
| cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) | ||||
| 
 | ||||
| option(BUILD_SHARED_LIBS "Use \"OFF\" for a static build." ON) | ||||
| 
 | ||||
| if (NOT OPENSSL_FOUND) | ||||
|   find_package(OpenSSL REQUIRED) | ||||
| endif() | ||||
|  | @ -27,7 +29,12 @@ include(GenerateExportHeader) | |||
| add_library(emulator_static STATIC ${EMULATOR_STATIC_SOURCE}) | ||||
| target_link_libraries(emulator_static PUBLIC ton_crypto ton_block smc-envelope) | ||||
| 
 | ||||
| add_library(emulator STATIC ${EMULATOR_SOURCE} ${EMULATOR_HEADERS}) | ||||
| if (NOT USE_EMSCRIPTEN AND BUILD_SHARED_LIBS) | ||||
|   add_library(emulator SHARED ${EMULATOR_SOURCE} ${EMULATOR_HEADERS}) | ||||
| else() | ||||
|   add_library(emulator STATIC ${EMULATOR_SOURCE} ${EMULATOR_HEADERS}) | ||||
| endif() | ||||
| 
 | ||||
| target_link_libraries(emulator PUBLIC emulator_static) | ||||
| generate_export_header(emulator EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/emulator_export.h) | ||||
| target_include_directories(emulator PUBLIC | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue