fix(FreeBSD): Use libraries from LOCALBASE (#1111)

Ensures proper linking when not building a port
This commit is contained in:
Le Baron d'Merde 2018-03-21 23:03:47 +00:00 committed by Patrick Ziegler
parent 0f34178104
commit 55331d17f7
1 changed files with 2 additions and 1 deletions

View File

@ -34,9 +34,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
# Need dprintf() for FreeBSD 11.1 and older
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WITH_DPRINTF")
# libinotify uses c99 extension, so suppress this error
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c99-extensions")
# Ensures that libraries from dependencies in LOCALBASE are used
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)