Merge pull request #142 from dotnet/anurse/fix-ubuntu-cmake

Fix cmake dependency on Ubuntu

Thanks @anurse!!
This commit is contained in:
Piotr Puszkiewicz 2015-11-03 10:42:51 -08:00
commit f176ae9387
2 changed files with 7 additions and 10 deletions

View file

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 2.6)
project (corehost)
set (CMAKE_CXX_STANDARD 11)
include_directories(inc)
@ -27,6 +27,11 @@ endif()
add_executable(corehost ${SOURCES})
# Older CMake doesn't support CMAKE_CXX_STANDARD and GCC/Clang need a switch to enable C++ 11
if(${CMAKE_CXX_COMPILER_ID} MATCHES "(Clang|GCC)")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-D__LINUX__)
target_link_libraries (corehost "dl")