Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
neodix42 committed Feb 21, 2025
1 parent 3c245c6 commit bd9fd54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 3 additions & 5 deletions emulator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

if (NOT OPENSSL_FOUND)
find_package(OpenSSL REQUIRED)
endif()
option(EMULATOR_STATIC "Build emulator as static library" OFF)

set(EMULATOR_STATIC_SOURCE
transaction-emulator.cpp
Expand All @@ -22,7 +20,7 @@ include(GenerateExportHeader)
add_library(emulator_static STATIC ${EMULATOR_STATIC_SOURCE})
target_link_libraries(emulator_static PUBLIC ton_crypto smc-envelope)

if (USE_EMSCRIPTEN)
if (EMULATOR_STATIC OR USE_EMSCRIPTEN)
add_library(emulator STATIC ${EMULATOR_SOURCE})
else()
add_library(emulator SHARED ${EMULATOR_SOURCE})
Expand All @@ -35,7 +33,7 @@ else()
endif()

generate_export_header(emulator EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/emulator_export.h)
if (USE_EMSCRIPTEN)
if (EMULATOR_STATIC OR USE_EMSCRIPTEN)
target_compile_definitions(emulator PUBLIC EMULATOR_STATIC_DEFINE)
endif()
target_include_directories(emulator PUBLIC
Expand Down
8 changes: 5 additions & 3 deletions tonlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

option(TONLIBJSON_STATIC "Build tonlibjson as static library" OFF)

if (NOT OPENSSL_FOUND)
find_package(OpenSSL REQUIRED)
endif()
Expand Down Expand Up @@ -79,7 +81,7 @@ if (NOT CMAKE_CROSSCOMPILING)
#FIXME
#add_dependencies(tonlib tonlib_generate_java_api)
endif()
endif()
endif()
add_library(tonlibjson_private STATIC tonlib/ClientJson.cpp tonlib/ClientJson.h)
target_include_directories(tonlibjson_private PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
Expand All @@ -90,7 +92,7 @@ set(TONLIB_JSON_HEADERS tonlib/tonlib_client_json.h)
set(TONLIB_JSON_SOURCE tonlib/tonlib_client_json.cpp)

include(GenerateExportHeader)
if (USE_EMSCRIPTEN)
if (TONLIBJSON_STATIC OR USE_EMSCRIPTEN)
add_library(tonlibjson STATIC ${TONLIB_JSON_SOURCE})
else()
add_library(tonlibjson SHARED ${TONLIB_JSON_SOURCE})
Expand All @@ -103,7 +105,7 @@ else()
endif()

generate_export_header(tonlibjson EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h)
if (USE_EMSCRIPTEN)
if (TONLIBJSON_STATIC OR USE_EMSCRIPTEN)
target_compile_definitions(tonlibjson PUBLIC TONLIBJSON_STATIC_DEFINE)
endif()
target_include_directories(tonlibjson PUBLIC
Expand Down

0 comments on commit bd9fd54

Please sign in to comment.