File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " cmake-rn " : minor
3+ ---
4+
5+ Expose includable WEAK_NODE_API_CONFIG to CMake projects
Original file line number Diff line number Diff line change @@ -49,8 +49,14 @@ export function getWeakNodeApiVariables(triplet: SupportedTriplet) {
4949 `Include path with a ';' is not supported: ${ includePath } ` ,
5050 ) ;
5151 }
52+ const cmakeConfigPath = path . join ( weakNodeApiPath , "weak-node-api.cmake" ) ;
53+ const libraryPath = getWeakNodeApiPath ( triplet ) ;
5254 return {
55+ // Expose an includable CMake config file declaring the weak-node-api target
56+ WEAK_NODE_API_CONFIG : cmakeConfigPath ,
57+ WEAK_NODE_API_LIB : libraryPath ,
58+ // For compatibility with cmake-js
5359 CMAKE_JS_INC : includePaths . join ( ";" ) ,
54- CMAKE_JS_LIB : getWeakNodeApiPath ( triplet ) ,
60+ CMAKE_JS_LIB : libraryPath ,
5561 } ;
5662}
Original file line number Diff line number Diff line change 1+ add_library (weak-node-api SHARED IMPORTED )
2+
3+ set_target_properties (weak-node-api PROPERTIES
4+ IMPORTED_LOCATION "${WEAK_NODE_API_LIB} "
5+ INTERFACE_INCLUDE_DIRECTORIES "${WEAK_NODE_API_INC} "
6+ )
You can’t perform that action at this time.
0 commit comments