Skip to content

Commit

Permalink
build(cmake): static build
Browse files Browse the repository at this point in the history
  • Loading branch information
JaDogg committed Apr 7, 2024
1 parent 42cad4f commit 3a155ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 3a155ef

Please sign in to comment.