cmake_minimum_required(VERSION 3.15 FATAL_ERROR) project(platform_decree) if(NOT BN_INTERNAL_BUILD) add_subdirectory(${PROJECT_SOURCE_DIR}/../.. ${PROJECT_BINARY_DIR}/api) endif() file(GLOB SOURCES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/*.cpp ${PROJECT_SOURCE_DIR}/*.h) if(DEMO) add_library(platform_decree STATIC ${SOURCES}) else() add_library(platform_decree SHARED ${SOURCES}) endif() target_link_libraries(platform_decree binaryninjaapi) set_target_properties(platform_decree PROPERTIES CXX_STANDARD 20 CXX_VISIBILITY_PRESET hidden CXX_STANDARD_REQUIRED ON VISIBILITY_INLINES_HIDDEN ON POSITION_INDEPENDENT_CODE ON) if(BN_INTERNAL_BUILD) plugin_rpath(platform_decree) set_target_properties(platform_decree PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR} RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}) endif()