Skip to content

Commit

Permalink
- use static standard libraries for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Jan 25, 2023
1 parent 24010dc commit 0678775
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@ ENDIF( NOT CMAKE_BUILD_TYPE )

set( SSE_MATTERS NO )

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
endif()

if( CMAKE_COMPILER_IS_GNUCXX )
set( GPROF 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." )
set( PROFILE 0 CACHE INT "1=Generate profile coverage info, 2=Use it" )
if (NOT MACOSX)
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -static -static-libgcc -static-libstdc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++")
endif()
endif( CMAKE_COMPILER_IS_GNUCXX )

find_package( ZLIB )

if( MSVC )
Expand Down

0 comments on commit 0678775

Please sign in to comment.