From b0c109d5f7b6c0b26903139a3c02b63e39a25706 Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Wed, 22 Feb 2023 12:32:19 +0300 Subject: [PATCH] use target from variable --- CMakeLists.txt | 2 +- lib/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 423f47817..7d6ce9bd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -499,9 +499,9 @@ if(APPLE_IOS) add_subdirectory(ios) endif() +set(VCMI_LIB_TARGET vcmi) include(VCMI_lib) add_subdirectory(lib) -set(VCMI_LIB_TARGET vcmi) if(ENABLE_SINGLE_APP_BUILD) add_subdirectory(lib_server) endif() diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index fe3b51478..5b0190bd6 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -add_main_lib(vcmi SHARED) +add_main_lib(${VCMI_LIB_TARGET} SHARED) if(ENABLE_SINGLE_APP_BUILD) - target_compile_definitions(vcmi PUBLIC VCMI_LIB_NAMESPACE=LIB_CLIENT) + target_compile_definitions(${VCMI_LIB_TARGET} PUBLIC VCMI_LIB_NAMESPACE=LIB_CLIENT) endif()