diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt index c07fcdd3..4ae51124 100644 --- a/compiler/CMakeLists.txt +++ b/compiler/CMakeLists.txt @@ -1,6 +1,12 @@ cmake_minimum_required(VERSION 3.5) project(Yaksha) +if(NOT DEFINED ENV{YAKSHA_NO_STATIC}) +set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") +set(BUILD_SHARED_LIBS OFF) +set(CMAKE_EXE_LINKER_FLAGS "-static") +endif() + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF)