mirror of
				https://github.com/lov3b/Pong.git
				synced 2025-11-03 23:00:19 +01:00 
			
		
		
		
	enable static linking if under release mode
This commit is contained in:
		@@ -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 ()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user