20 lines
553 B
CMake
20 lines
553 B
CMake
cmake_minimum_required(VERSION 3.17.0)
|
|
|
|
# Start Project
|
|
project(trampoline)
|
|
|
|
# Headers
|
|
add_library(trampoline-headers INTERFACE)
|
|
target_include_directories(trampoline-headers INTERFACE include)
|
|
|
|
# Check Architecture
|
|
include(CheckSymbolExists)
|
|
check_symbol_exists("__arm__" "" TRAMPOLINE_IS_GUEST)
|
|
if(NOT TRAMPOLINE_IS_GUEST)
|
|
target_compile_definitions(trampoline-headers INTERFACE MCPI_BUILD_RUNTIME)
|
|
return()
|
|
endif()
|
|
|
|
# Library To Call Trampoline
|
|
add_library(trampoline OBJECT src/guest.cpp)
|
|
target_link_libraries(trampoline trampoline-headers) |