mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 08:36:16 +00:00
no need to export anything if MOMO_BUILD_AS_LIBRARY
This commit is contained in:
@@ -5,6 +5,12 @@ cmake_minimum_required(VERSION 3.26.4)
|
|||||||
option(MOMO_ENABLE_SANITIZER "Enable sanitizer" OFF)
|
option(MOMO_ENABLE_SANITIZER "Enable sanitizer" OFF)
|
||||||
option(MOMO_BUILD_AS_LIBRARY "Configure and Build the emulator as a shared library (without the samples and tests)" OFF)
|
option(MOMO_BUILD_AS_LIBRARY "Configure and Build the emulator as a shared library (without the samples and tests)" OFF)
|
||||||
|
|
||||||
|
if(MOMO_BUILD_AS_LIBRARY)
|
||||||
|
add_compile_definitions(MOMO_BUILD_AS_LIBRARY=1)
|
||||||
|
else()
|
||||||
|
add_compile_definitions(MOMO_BUILD_AS_LIBRARY=0)
|
||||||
|
endif()
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
|
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
namespace unicorn
|
namespace unicorn
|
||||||
{
|
{
|
||||||
|
#if !MOMO_BUILD_AS_LIBRARY
|
||||||
UNICORN_EMULATOR_DLL_STORAGE
|
UNICORN_EMULATOR_DLL_STORAGE
|
||||||
|
#endif
|
||||||
std::unique_ptr<x64_emulator> create_x64_emulator();
|
std::unique_ptr<x64_emulator> create_x64_emulator();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user