mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-30 13:24:16 +01:00
Link Cocoa, IOKit and CoreVideo on OSX
These are implicitly linked by Xcode, but with this, you can also build it with any other generator, which does not have this behavior. CoreFoundation is included as a part of Cocoa (which is an umbrella framework), and Cocoa is generally recommended to link against, rather than its individual components (CoreFoundation, Foundation, libobjc, ...).
This commit is contained in:
parent
7d7ab70279
commit
1351819810
@ -106,9 +106,10 @@ if (ENABLE_GLFW)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
IF (APPLE)
|
IF (APPLE)
|
||||||
# CoreFoundation is required only on OSX
|
FIND_LIBRARY(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related
|
||||||
FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
|
FIND_LIBRARY(IOKIT_LIBRARY IOKit) # GLFW dependency
|
||||||
SET(PLATFORM_LIBRARIES iconv ${COREFOUNDATION_LIBRARY})
|
FIND_LIBRARY(COREVIDEO_LIBRARY CoreVideo) # GLFW dependency
|
||||||
|
set(PLATFORM_LIBRARIES iconv ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
||||||
|
Loading…
Reference in New Issue
Block a user