cmake_minimum_required(VERSION 3.10) project(cpp_example) # static linking set(CMAKE_EXE_LINKER_FLAGS "-static") add_executable(cpp_example main.cpp)