mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Set -xobjective-c or -xobjective-c++ for Mac code depending compiler.
Also require at least Cmake-3.3 for Apple as that's the minimum that supports the COMPILE_LANGUAGE generator expression.
This commit is contained in:
parent
e1ba2ed4bd
commit
5b2439e7c9
@ -1,6 +1,6 @@
|
||||
# CMakeLists.txt for GnuCash
|
||||
|
||||
IF (WIN32)
|
||||
IF (WIN32 OR APPLE)
|
||||
CMAKE_MINIMUM_REQUIRED (VERSION 3.3.2)
|
||||
ELSE()
|
||||
CMAKE_MINIMUM_REQUIRED (VERSION 3.0)
|
||||
@ -349,7 +349,7 @@ IF(APPLE)
|
||||
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
|
||||
FIND_LIBRARY(SECURITY_LIBRARY Security)
|
||||
FIND_LIBRARY(CARBON_LIBRARY Carbon)
|
||||
SET(OSX_EXTRA_COMPILE_FLAGS -xobjective-c)
|
||||
SET(OSX_EXTRA_COMPILE_FLAGS $<$<COMPILE_LANGUAGE:C>:-xobjective-c> $<$<COMPILE_LANGUAGE:CXX>:-xobjective-c++>)
|
||||
SET(OSX_EXTRA_LIBRARIES objc ${COCOA_LIBRARY} ${SECURITY_LIBRARY} ${CARBON_LIBRARY})
|
||||
ENDIF(GTK_MAC_FOUND)
|
||||
ENDIF()
|
||||
|
Loading…
Reference in New Issue
Block a user