mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
Work around check_libs failing on OS X due to -x objective-c.
This commit is contained in:
parent
fd855758cc
commit
599e42c562
@ -240,12 +240,6 @@ if(APPLE)
|
||||
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/usr")
|
||||
endif()
|
||||
|
||||
# Some of our code contains Objective C constructs.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c -stdlib=libc++")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++ -stdlib=libc++")
|
||||
# Avoid mistaking an object file for a source file on the link command line.
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")
|
||||
|
||||
# Identify the target system:
|
||||
# Ask for 64-bit binary.
|
||||
set(TARGET_FLAGS "-arch x86_64")
|
||||
@ -838,6 +832,15 @@ add_definitions(-std=gnu++0x)
|
||||
# but some dependencies require them (LLVM, libav).
|
||||
add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS)
|
||||
|
||||
# Do this at the last minute because try_compile ignores linker flags. Yay...
|
||||
if(APPLE)
|
||||
# Some of our code contains Objective C constructs.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c -stdlib=libc++")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++ -stdlib=libc++")
|
||||
# Avoid mistaking an object file for a source file on the link command line.
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")
|
||||
endif()
|
||||
|
||||
add_subdirectory(Source)
|
||||
|
||||
|
||||
@ -883,4 +886,3 @@ list(APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_BINARY_DIR}")
|
||||
# CPack must be included after the CPACK_* variables are set in order for those
|
||||
# variables to take effect.
|
||||
Include(CPack)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user