Fixed OS X build

The program should now build and run on OS X 10.7 or newer.
This commit is contained in:
Daniel Wolf 2015-12-14 13:31:28 +01:00 committed by Daniel Wolf
parent 932803d5ad
commit 880c6e45af
1 changed files with 8 additions and 0 deletions

View File

@ -1,8 +1,16 @@
cmake_minimum_required(VERSION 3.3) cmake_minimum_required(VERSION 3.3)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7" CACHE STRING "Minimum OS X deployment version")
project(LipSync) project(LipSync)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
if("${CMAKE_GENERATOR}" STREQUAL "Xcode")
# Make sure Xcode uses libc++ instead of libstdc++, allowing us to use the C++11 standard library prior to OS X 10.9
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")