File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,17 @@ fn generate_stubs() -> PathBuf {
5151 . unwrap ( ) ;
5252
5353 let stubs_path = api_base_path. join ( "stubs" ) ;
54- cmake:: build ( stubs_path) . join ( "build" )
54+ let mut cmake_config = cmake:: Config :: new ( stubs_path) ;
55+
56+ if cfg ! ( target_os = "windows" ) {
57+ cmake_config. build_arg ( "-clp:ShowCommandLine" ) ;
58+ }
59+ else {
60+ cmake_config. build_arg ( "VERBOSE=1" ) ;
61+ }
62+ cmake_config
63+ . build ( )
64+ . join ( "build" )
5565}
5666
5767fn main ( ) {
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.19 FATAL_ERROR)
22project (binaryninjacore_stubs)
33
4- file (REAL_PATH "${PROJECT_SOURCE_DIR} /../" ABSOLUTE_API_PATH)
5-
64# Generate stubs.cpp with implementations of all the BNAPI functions
7- execute_process (COMMAND python ${PROJECT_SOURCE_DIR} /generate_stubs.py ${ABSOLUTE_API_PATH} /binaryninjacore.h ${PROJECT_BINARY_DIR} )
5+ execute_process (COMMAND python ${PROJECT_SOURCE_DIR} /generate_stubs.py ${PROJECT_SOURCE_DIR} /.. /binaryninjacore.h ${PROJECT_BINARY_DIR} )
86
97# Compile those stubs into a stub library we can use to fool the linker
108add_library (binaryninjacore_stubs SHARED ${PROJECT_BINARY_DIR} /stubs.cpp)
@@ -20,6 +18,14 @@ set_target_properties(binaryninjacore_stubs
2018 ARCHIVE_OUTPUT_DIRECTORY $<1:${PROJECT_BINARY_DIR} >
2119)
2220
23- target_include_directories (binaryninjacore_stubs PUBLIC ${ABSOLUTE_API_PATH} )
21+ get_target_property (LIB_INCLUDES binaryninjacore_stubs INCLUDE_DIRECTORIES )
22+ message (STATUS "Include directories for binaryninjacore_stubs: ${LIB_INCLUDES} " )
23+
24+ message (STATUS "Adding include path .." )
25+
26+ target_include_directories (binaryninjacore_stubs PUBLIC ..)
27+
28+ get_target_property (LIB_INCLUDES binaryninjacore_stubs INCLUDE_DIRECTORIES )
29+ message (STATUS "Include directories for binaryninjacore_stubs: ${LIB_INCLUDES} " )
2430
2531install (TARGETS binaryninjacore_stubs LIBRARY DESTINATION ${PROJECT_BINARY_DIR} )
You can’t perform that action at this time.
0 commit comments