mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-10 07:11:34 +00:00
RPGXCXX-1 make static build toggleable by the option BUILD_STATIC
This commit is contained in:
parent
11570b5291
commit
b5c4bd30fb
2 changed files with 9 additions and 6 deletions
|
@ -3,4 +3,9 @@ project(rpgxEF LANGUAGES CXX)
|
|||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(BUILD_STATIC false CACHE BOOL "whether to create static binaries")
|
||||
if(WIN32)
|
||||
set(BUILD_STATIC true CACHE BOOL "whether to create static binaries")
|
||||
endif(WIN32)
|
||||
|
||||
add_subdirectory(code)
|
||||
|
|
|
@ -22,13 +22,11 @@ else ()
|
|||
message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif ()
|
||||
|
||||
if(UNIX)
|
||||
set(UI_LINKER_OPTIONS -lstdc++fs)
|
||||
endif(UNIX)
|
||||
|
||||
if(WIN32)
|
||||
set(UI_LINKER_OPTIONS -static -static-libgcc -static-libstdc++ -lstdc++fs)
|
||||
endif(WIN32)
|
||||
set(UI_LINKER_OPTIONS -lstdc++fs)
|
||||
if(BUILD_STATIC)
|
||||
set(UI_LINKER_OPTIONS -static -static-libgcc -static-libstdc++ ${UI_LINKER_OPTIONS})
|
||||
endif(BUILD_STATIC)
|
||||
|
||||
set(UI_LIB_NAME "ui${ARCH}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue