|
|
@ -565,8 +565,8 @@ MACRO(NL_SETUP_BUILD)
|
|
|
|
ADD_PLATFORM_FLAGS("/X")
|
|
|
|
ADD_PLATFORM_FLAGS("/X")
|
|
|
|
|
|
|
|
|
|
|
|
IF(MSVC14)
|
|
|
|
IF(MSVC14)
|
|
|
|
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
|
|
|
ADD_PLATFORM_FLAGS("/Gy-")
|
|
|
|
# /Ox is working with VC++ 2015, but custom optimizations don't exist
|
|
|
|
# /Ox is working with VC++ 2015 and 2017, but custom optimizations don't exist
|
|
|
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
|
|
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
|
|
|
# without inlining it's unusable, use custom optimizations again
|
|
|
|
# without inlining it's unusable, use custom optimizations again
|
|
|
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
|
|
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
|
|
@ -664,6 +664,8 @@ MACRO(NL_SETUP_BUILD)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
IF(APPLE)
|
|
|
|
IF(APPLE)
|
|
|
|
|
|
|
|
SET(OBJC_FLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch -fobjc-weak)
|
|
|
|
|
|
|
|
|
|
|
|
IF(NOT XCODE)
|
|
|
|
IF(NOT XCODE)
|
|
|
|
IF(CMAKE_OSX_ARCHITECTURES)
|
|
|
|
IF(CMAKE_OSX_ARCHITECTURES)
|
|
|
|
SET(TARGETS_COUNT 0)
|
|
|
|
SET(TARGETS_COUNT 0)
|
|
|
@ -1167,6 +1169,7 @@ MACRO(SETUP_EXTERNAL)
|
|
|
|
|
|
|
|
|
|
|
|
IF(APPLE)
|
|
|
|
IF(APPLE)
|
|
|
|
IF(WITH_STATIC_EXTERNAL)
|
|
|
|
IF(WITH_STATIC_EXTERNAL)
|
|
|
|
|
|
|
|
# Look only for static libraries because systems libraries are using Frameworks
|
|
|
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
|
|
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
|
|
|
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
|
|
|
@ -1180,12 +1183,13 @@ MACRO(SETUP_EXTERNAL)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
# Android and iOS have pthread
|
|
|
|
# Android, iOS and Mac OS X have pthread, but no need to link to libpthread
|
|
|
|
IF(ANDROID OR IOS)
|
|
|
|
IF(ANDROID OR APPLE)
|
|
|
|
SET(CMAKE_USE_PTHREADS_INIT 1)
|
|
|
|
SET(CMAKE_USE_PTHREADS_INIT 1)
|
|
|
|
SET(Threads_FOUND TRUE)
|
|
|
|
SET(Threads_FOUND TRUE)
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
FIND_PACKAGE(Threads REQUIRED)
|
|
|
|
SET(THREADS_HAVE_PTHREAD_ARG ON)
|
|
|
|
|
|
|
|
FIND_PACKAGE(Threads)
|
|
|
|
# TODO: replace all -l<lib> by absolute path to <lib> in CMAKE_THREAD_LIBS_INIT
|
|
|
|
# TODO: replace all -l<lib> by absolute path to <lib> in CMAKE_THREAD_LIBS_INIT
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|