Skip to content

Commit

Permalink
Change PUBLIC to PRIVATE for linking to unicorn-common
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexodia committed Jan 18, 2022
1 parent d200eb4 commit 5d471d8
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ endif()
# Detect if unicorn is compiled as the top-level project
set(PROJECT_IS_TOP_LEVEL OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(PROJECT_IS_TOP_LEVEL ON)
set(PROJECT_IS_TOP_LEVEL ON)

# Enable folder support
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()

project(unicorn C)
Expand Down Expand Up @@ -1132,64 +1132,64 @@ if(UNICORN_HAS_X86)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_X86)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} x86_64-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_x86 sample_x86_32_gdt_and_seg_regs sample_batch_reg mem_apis shellcode)
target_link_libraries(x86_64-softmmu PUBLIC unicorn-common)
target_link_libraries(x86_64-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_x86)
endif()
if(UNICORN_HAS_ARM)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_ARM)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} arm-softmmu armeb-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_arm)
target_link_libraries(arm-softmmu PUBLIC unicorn-common)
target_link_libraries(armeb-softmmu PUBLIC unicorn-common)
target_link_libraries(arm-softmmu PRIVATE unicorn-common)
target_link_libraries(armeb-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_arm)
endif()
if(UNICORN_HAS_AARCH64)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_ARM64)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} aarch64-softmmu aarch64eb-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_arm64)
target_link_libraries(aarch64-softmmu PUBLIC unicorn-common)
target_link_libraries(aarch64eb-softmmu PUBLIC unicorn-common)
target_link_libraries(aarch64-softmmu PRIVATE unicorn-common)
target_link_libraries(aarch64eb-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_arm64)
endif()
if(UNICORN_HAS_M68K)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_M68K)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} m68k-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_m68k)
target_link_libraries(m68k-softmmu PUBLIC unicorn-common)
target_link_libraries(m68k-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_m68k)
endif()
if(UNICORN_HAS_MIPS)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_mips)
target_link_libraries(mips-softmmu PUBLIC unicorn-common)
target_link_libraries(mipsel-softmmu PUBLIC unicorn-common)
target_link_libraries(mips64-softmmu PUBLIC unicorn-common)
target_link_libraries(mips64el-softmmu PUBLIC unicorn-common)
target_link_libraries(mips-softmmu PRIVATE unicorn-common)
target_link_libraries(mipsel-softmmu PRIVATE unicorn-common)
target_link_libraries(mips64-softmmu PRIVATE unicorn-common)
target_link_libraries(mips64el-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_mips)
endif()
if(UNICORN_HAS_SPARC)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_SPARC)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} sparc-softmmu sparc64-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_sparc)
target_link_libraries(sparc-softmmu PUBLIC unicorn-common)
target_link_libraries(sparc64-softmmu PUBLIC unicorn-common)
target_link_libraries(sparc-softmmu PRIVATE unicorn-common)
target_link_libraries(sparc64-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_sparc)
endif()
if(UNICORN_HAS_PPC)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_PPC)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} ppc-softmmu ppc64-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_ppc)
target_link_libraries(ppc-softmmu PUBLIC unicorn-common)
target_link_libraries(ppc64-softmmu PUBLIC unicorn-common)
target_link_libraries(ppc-softmmu PRIVATE unicorn-common)
target_link_libraries(ppc64-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_ppc)
endif()
if(UNICORN_HAS_RISCV)
set(UNICORN_COMPILE_OPTIONS ${UNICORN_COMPILE_OPTIONS} -DUNICORN_HAS_RISCV)
set(UNICORN_LINK_LIBRARIES ${UNICORN_LINK_LIBRARIES} riscv32-softmmu riscv64-softmmu)
set(UNICORN_SAMPLE_FILE ${UNICORN_SAMPLE_FILE} sample_riscv)
target_link_libraries(riscv32-softmmu PUBLIC unicorn-common)
target_link_libraries(riscv64-softmmu PUBLIC unicorn-common)
target_link_libraries(riscv32-softmmu PRIVATE unicorn-common)
target_link_libraries(riscv64-softmmu PRIVATE unicorn-common)
set(UNICORN_TEST_FILE ${UNICORN_TEST_FILE} test_riscv)
endif()

Expand Down

0 comments on commit 5d471d8

Please sign in to comment.