Fix compiling on MacOSX Systems

Setting those options made OSX quite upset for some reason, so disable them when on Macs. I haven't been able to find any issues with this, so hopefully it doesn't subtly break anything.

Additionally, this will add the default MacPorts library directory to the LD Path, which fixes linking against Log4CPP.
This commit is contained in:
HeroCC 2018-06-27 10:14:14 -04:00 committed by Patrik Dahlström
parent d045e12c54
commit 792517ddb4

View File

@ -2,7 +2,12 @@ cmake_minimum_required(VERSION 2.8.0)
project(mumlib) project(mumlib)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if (NOT APPLE)
add_definitions(-DOPT_TLS_GNUTLS -D_POSIX_C_SOURCE=200112L) add_definitions(-DOPT_TLS_GNUTLS -D_POSIX_C_SOURCE=200112L)
else()
LINK_DIRECTORIES(/opt/local/lib) # Include the default MacPorts library directory
endif()
INCLUDE(FindPkgConfig) INCLUDE(FindPkgConfig)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)