"Fossies" - the Fresh Open Source Software Archive

Member "cutter-1.9.0/src/cmake/BundledRadare2.cmake" (6 Sep 2019, 1464 Bytes) of package /linux/privat/cutter-1.9.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) CMake source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 include(ExternalProject)
    3 
    4 set(RADARE2_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../radare2")
    5 set(RADARE2_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/Radare2-prefix")
    6 set(MESON_OPTIONS "--prefix=${RADARE2_INSTALL_DIR}" --libdir=lib)
    7 
    8 find_program(MESON meson)
    9 if(NOT MESON)
   10     message(FATAL_ERROR "Failed to find meson, which is required to build bundled radare2")
   11 endif()
   12 
   13 find_program(NINJA ninja)
   14 if(NOT NINJA)
   15     message(FATAL_ERROR "Failed to find ninja, which is required to build bundled radare2")
   16 endif()
   17 
   18 ExternalProject_Add(Radare2-Bundled
   19         SOURCE_DIR "${RADARE2_SOURCE_DIR}"
   20         INSTALL_DIR "${RADARE2_INSTALL_DIR}"
   21         CONFIGURE_COMMAND "${MESON}" "${RADARE2_SOURCE_DIR}" ${MESON_OPTIONS} && "${MESON}" configure ${MESON_OPTIONS}
   22         BUILD_COMMAND "${NINJA}"
   23         INSTALL_COMMAND "${NINJA}" install)
   24 
   25 set(Radare2_INCLUDE_DIRS "${RADARE2_INSTALL_DIR}/include/libr")
   26 
   27 add_library(Radare2 INTERFACE)
   28 add_dependencies(Radare2 Radare2-Bundled)
   29 if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
   30     target_link_directories(Radare2 INTERFACE "${RADARE2_INSTALL_DIR}/lib")
   31 else()
   32     link_directories("${RADARE2_INSTALL_DIR}/lib")
   33 endif()
   34 target_link_libraries(Radare2 INTERFACE
   35         r_core r_config r_cons r_io r_util r_flag r_asm r_debug
   36         r_hash r_bin r_lang r_io r_anal r_parse r_bp r_egg r_reg
   37         r_search r_syscall r_socket r_fs r_magic r_crypto)
   38 target_include_directories(Radare2 INTERFACE "${Radare2_INCLUDE_DIRS}")