Bundle static libraries

This commit is contained in:
2022-04-04 00:26:00 +02:00
parent da561f6164
commit 82559cb9a7
2 changed files with 99 additions and 0 deletions

View File

@@ -23,6 +23,8 @@ set(UNICORN_VERSION_MAJOR 2)
set(UNICORN_VERSION_MINOR 0)
set(UNICORN_VERSION_PATCH 0)
include(bundle_static.cmake)
option(BUILD_SHARED_LIBS "Build shared instead of static library" ${PROJECT_IS_TOP_LEVEL})
option(UNICORN_FUZZ "Enable fuzzing" OFF)
option(UNICORN_BUILD_TESTS "Build unicorn tests" ${PROJECT_IS_TOP_LEVEL})
@@ -1279,6 +1281,10 @@ target_include_directories(unicorn PUBLIC
include
)
if (NOT BUILD_SHARED_LIBS)
bundle_static_library(unicorn unicorn_static)
endif()
if(UNICORN_INSTALL AND NOT MSVC)
include("GNUInstallDirs")
file(GLOB UNICORN_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/unicorn/*.h)