mirror of
https://github.com/lov3b/Pong.git
synced 2025-01-18 12:40:12 +01:00
enable static linking if under release mode
This commit is contained in:
parent
a4e5e14428
commit
cdbcc0330d
@ -54,6 +54,11 @@ target_link_libraries(Pong ${SDL2_LIBRARIES} ${SDL2_GFX_LIBRARY} ${SDL2_TTF_LIBR
|
|||||||
# Set compiler optimization flags
|
# Set compiler optimization flags
|
||||||
if (ENABLE_OPTIMIZATIONS)
|
if (ENABLE_OPTIMIZATIONS)
|
||||||
message(STATUS "Optimizations are enabled")
|
message(STATUS "Optimizations are enabled")
|
||||||
|
set_target_properties(Pong PROPERTIES LINK_SEARCH_START_STATIC 1)
|
||||||
|
set_target_properties(Pong PROPERTIES LINK_SEARCH_END_STATIC 1)
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(Pong PRIVATE /O2)
|
target_compile_options(Pong PRIVATE /O2)
|
||||||
else ()
|
else ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user