mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 11:44:55 +00:00
Better CMake configuration for Xcode
This commit is contained in:
@@ -2,6 +2,21 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries)
|
||||
|
||||
if(APPLE)
|
||||
# Shaddup Xcode
|
||||
function(add_executable TARGET)
|
||||
_add_executable(${TARGET} ${ARGN})
|
||||
set_target_properties(${TARGET} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
||||
endfunction()
|
||||
function(add_library TARGET)
|
||||
_add_library(${TARGET} ${ARGN})
|
||||
list(GET ARGV 1 ARG1)
|
||||
if(NOT ${ARG1} STREQUAL INTERFACE)
|
||||
set_target_properties(${TARGET} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
||||
endif()
|
||||
endfunction()
|
||||
endif()
|
||||
|
||||
if(APPLE AND NOT CMAKE_OSX_SYSROOT)
|
||||
# If the Xcode SDK is lagging behind system version, CMake needs this done first
|
||||
execute_process(COMMAND xcrun --sdk macosx --show-sdk-path
|
||||
|
||||
2
hecl
2
hecl
Submodule hecl updated: 04a725a262...c4e21d26fe
Reference in New Issue
Block a user