Permalink
Browse files

Merge pull request #7191 from GerbilSoft/feature/ar-thin-archives

CMake: Use thin archives on Linux.
  • Loading branch information...
degasus committed Jul 3, 2018
2 parents 806c1ee + 0149d22 commit 4b1b713e61fa3170b53968d8531ec1f272ea2f89
Showing with 12 additions and 3 deletions.
  1. +11 −2 CMakeLists.txt
  2. +1 −1 Source/Core/Common/CMakeLists.txt
View
@@ -48,7 +48,7 @@ option(OPROFILING "Enable profiling" OFF)
option(DSPTOOL "Build dsptool" OFF)
# Enable SDL for default on operating systems that aren't OSX, Android, Linux or Windows.
if(NOT APPLE AND NOT ANDROID AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT MSVC)
if(NOT APPLE AND NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT MSVC)
option(ENABLE_SDL "Enables SDL as a generic controller backend" ON)
else()
option(ENABLE_SDL "Enables SDL as a generic controller backend" OFF)
@@ -59,7 +59,7 @@ if(APPLE)
option(SKIP_POSTPROCESS_BUNDLE "Skip postprocessing bundle for redistributability" OFF)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
option(ENABLE_VTUNE "Enable Intel VTune integration for JIT code." OFF)
if(NOT ANDROID)
@@ -259,6 +259,15 @@ else()
dolphin_compile_definitions(_DEBUG DEBUG_ONLY)
check_and_add_flag(GGDB -ggdb DEBUG_ONLY)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# GNU ar: Create thin archive files.
# Requires binutils-2.19 or later.
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
@@ -142,7 +142,7 @@ elseif(USE_X11)
target_link_libraries(common PUBLIC ${XRANDR_LIBRARIES})
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(common PUBLIC dl rt)
endif()

0 comments on commit 4b1b713

Please sign in to comment.