summaryrefslogtreecommitdiff
path: root/platform/linux/CMakeLists.txt
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2023-06-13 11:29:42 -0600
committerRusty Wagner <rusty.wagner@gmail.com>2023-06-13 16:46:47 -0400
commit52eb0de5dcddaee2b8bd3122512ae4c20e0e9545 (patch)
tree8543df055ebc32d32283c0231cbeb6c7fd424533 /platform/linux/CMakeLists.txt
parentadb7ef55fc4e24f03e6faf353cc9122ee07c714f (diff)
Move platform submodules into API
Diffstat (limited to 'platform/linux/CMakeLists.txt')
-rw-r--r--platform/linux/CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/platform/linux/CMakeLists.txt b/platform/linux/CMakeLists.txt
new file mode 100644
index 00000000..03c1ce5d
--- /dev/null
+++ b/platform/linux/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
+
+project(platform_linux)
+
+if(NOT BN_INTERNAL_BUILD)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/../.. ${PROJECT_BINARY_DIR}/api)
+endif()
+
+file(GLOB SOURCES
+ ${PROJECT_SOURCE_DIR}/*.cpp
+ ${PROJECT_SOURCE_DIR}/*.h)
+
+if(DEMO)
+ add_library(platform_linux STATIC ${SOURCES})
+else()
+ add_library(platform_linux SHARED ${SOURCES})
+endif()
+
+target_link_libraries(platform_linux binaryninjaapi)
+
+set_target_properties(platform_linux PROPERTIES
+ CXX_STANDARD 17
+ CXX_VISIBILITY_PRESET hidden
+ CXX_STANDARD_REQUIRED ON
+ VISIBILITY_INLINES_HIDDEN ON
+ POSITION_INDEPENDENT_CODE ON)
+
+if(BN_INTERNAL_BUILD)
+ plugin_rpath(platform_linux)
+ set_target_properties(platform_linux PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}
+ RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR})
+endif()