Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Bootstrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ project(Bootstrapper)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Use static CRT (/MT) - no dependency on vcruntime140.dll, ucrtbase.dll, or msvcp140.dll
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

add_library(${PROJECT_NAME} SHARED src/library.cpp)
target_include_directories(${PROJECT_NAME} PRIVATE include)

if (NOT WIN32)
target_link_libraries(${PROJECT_NAME} PRIVATE dl)
# Statically link libgcc and libstdc++ - no dependency on system libgcc_s.so or libstdc++.so
target_link_options(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++)
endif ()

install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_BINARY_DIR}/bin)