Skip to content

Commit a44fa94

Browse files
committed
Fix linkage problem when building unicorn as a subproject
1 parent c02e9f3 commit a44fa94

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ option(AFL_DEBUG "Enable debug output" off)
1111

1212
set (CMAKE_CXX_STANDARD 17)
1313

14-
option(UNICORN_BUILD_SHARED "Build shared instead of static library" ON)
14+
option(BUILD_SHARED_LIBS "Build shared instead of static library" ON)
1515

16-
if (UNICORN_BUILD_SHARED)
16+
if (BUILD_SHARED_LIBS)
1717
add_library(unicornafl SHARED unicornafl.cpp)
1818
else()
1919
add_library(unicornafl STATIC unicornafl.cpp)

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ build:
77

88
unicorn/build/libunicorn-common.a:
99
git submodule update --init --recursive
10-
cmake -S unicorn/ -B unicorn/build -D UNICORN_BUILD_SHARED=no
10+
cmake -S unicorn/ -B unicorn/build -D BUILD_SHARED_LIBS=no
1111
$(MAKE) -C ./unicorn/build -j8
1212

1313
build/libunicornafl: build unicorn/build/libunicorn-common.a
14-
cd ./build && cmake .. -D UNICORN_BUILD_SHARED=no
14+
cd ./build && cmake .. -D BUILD_SHARED_LIBS=no
1515
$(MAKE) -C ./build -j8
1616

1717
format:

0 commit comments

Comments
 (0)