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 authored and Your Name committed Jan 25, 2023
1 parent 24010dc commit 8ca131e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ 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 )
Expand Down

0 comments on commit 8ca131e

Please sign in to comment.