Link all dependencies statically
This commit is contained in:
parent
64b92b009c
commit
56055641c1
|
@ -2,9 +2,10 @@ cmake_minimum_required(VERSION 3.18)
|
|||
project(PokemonScriptTester)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
option(WINDOWS "Whether the build target is Windows or not." OFF)
|
||||
set(STATICC TRUE)
|
||||
set(SHARED OFF)
|
||||
|
||||
include(CMakeLists.txt.in)
|
||||
include_pkmnlib()
|
||||
|
@ -13,12 +14,17 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
add_compile_options(-fconcepts)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_link_options(-fuse-ld=lld)
|
||||
endif ()
|
||||
|
||||
|
||||
file(GLOB_RECURSE SRC_FILES src/*.cpp src/*.hpp)
|
||||
add_executable(PokemonScriptTester ${SRC_FILES})
|
||||
target_precompile_headers(PokemonScriptTester PUBLIC src/Precompiled.hxx)
|
||||
add_definitions(-DLEVEL_U8)
|
||||
|
||||
SET(_LINKS Arbutils CreatureLib pkmnLib -lpthread)
|
||||
SET(_LINKS -static pkmnLib)
|
||||
target_link_libraries(PokemonScriptTester PUBLIC ${_LINKS})
|
||||
target_compile_options(PokemonScriptTester PRIVATE -Wall -Wextra -Werror)
|
||||
|
||||
|
|
Loading…
Reference in New Issue