diff options
-rw-r--r-- | cmake/apple.cmake | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/cmake/apple.cmake b/cmake/apple.cmake index 054e1ae5..a166c1e9 100644 --- a/cmake/apple.cmake +++ b/cmake/apple.cmake @@ -1,24 +1,20 @@ -SET(CMAKE_SYSTEM_NAME Darwin) -SET(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "" FORCE) -SET(CMAKE_C_COMPILER ${c}cc) -SET(CMAKE_CXX_COMPILER ${c}c++) -set(CMAKE_LINKER ${c}c++) +set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++" CACHE STRING "" FORCE) -set(CMAKE_OSX_ARCHITECTURES x86_64) -set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8) -# change this -set(CMAKE_OSX_SYSROOT /var/root/MacOSX10.8.sdk) +set(CMAKE_C_FLAGS_RELEASE "-ffast-math -O3 -flto -fvisibility=hidden" CACHE STRING "" FORCE) +set(CMAKE_CXX_FLAGS_RELEASE " ${CMAKE_C_FLAGS_RELEASE} -fvisibility-inlines-hidden " CACHE STRING "" FORCE) -set(fpu "-fno-math-errno -funsafe-math-optimizations -fno-signed-zeros") -set(cpu "-O3 -DNDEBUG -flto ${fpu}") -set(cxx "-std=c++11 -stdlib=libc++") +set(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++ -std=c++11" CACHE STRING "" FORCE) +set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE STRING "" FORCE) +set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE STRING "" FORCE) -set(CFLAGS-OVERRIDE "" CACHE STRING "") +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-flto" CACHE STRING "" FORCE) +set(CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE) +set(CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE) -set(CMAKE_C_FLAGS_RELEASE "${cpu} ${CFLAGS-OVERRIDE}" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${cxx}" CACHE STRING "" FORCE) -set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${cpu} ${CFLAGS-OVERRIDE}" CACHE STRING "" FORCE) -set(CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE) -set(CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE} CACHE STRING "" FORCE) -set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE) +set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "" FORCE) +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "" FORCE) + +set(OpenCV_DIR ~/dev/opentrack-depends/opencv/build) +set(Qt5_DIR ~/Qt5.5.1/5.5/clang_64/lib/cmake/Qt5) |