Skip to content

Commit

Permalink
fix: electron build
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Jul 24, 2024
1 parent 4165a06 commit 73e631b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cortex-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ project(cortex-cpp C CXX)

# Build using CMAKE-JS
if(DEFINED CMAKE_JS_INC)
add_definitions(
-DV8_COMPRESS_POINTERS
-DV8_REVERSE_JSARGS
-DV8_COMPRESS_POINTERS_IN_ISOLATE_CAGE
)
include_directories(${CMAKE_JS_INC})
endif()

Expand Down Expand Up @@ -76,6 +81,16 @@ if(DEFINED CMAKE_JS_INC)

add_library(${PROJECT_NAME} SHARED addon.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/cpuid/cpu_info.cc
${CMAKE_JS_SRC}
)

target_link_libraries(${PROJECT_NAME}
PRIVATE
msvcprt.lib
msvcrt.lib
vcruntime.lib
ucrt.lib
${CMAKE_JS_LIB}
)
else() # Official build
add_executable(${PROJECT_NAME} main.cc
Expand Down

0 comments on commit 73e631b

Please sign in to comment.