From 5d471d81e7e059da54ba479051cfa264f3902274 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Tue, 18 Jan 2022 22:23:38 +0100 Subject: [PATCH] Change PUBLIC to PRIVATE for linking to unicorn-common --- CMakeLists.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bdd4a8ac..c5088038 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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()