Skip to content

Commit

Permalink
added freebsd build support - tested on freebsd 11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ehasting committed Mar 16, 2018
1 parent 8dcdef0 commit e228acc
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,32 @@ target_include_directories(slack++
PRIVATE ${LIBNOTIFY_INCLUDE_DIRS}
PUBLIC include)

target_link_libraries(slack++



if ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")

message ("Building on FreeBSD")
find_library(JSONCPP_LIB jsoncpp HINTS /usr/local/lib)
find_library(NCURSESW_LIB ncursesw HINTS /usr/local/lib)
target_link_libraries(slack++
${OPENSSL_SSL_LIBRARY}
${OPENSSL_CRYPTO_LIBRARY}
${CURL_LIBRARIES}
${JSONCPP_LIB}
${NCURSESW_LIB}
${LIBNOTIFY_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})
else()
message("Building default (${CMAKE_SYSTEM_NAME})")
target_link_libraries(slack++
${OPENSSL_SSL_LIBRARY}
${OPENSSL_CRYPTO_LIBRARY}
${CURL_LIBRARIES}
${JSONCPP_LIBRARIES}
${NCURSESW_LIBRARIES}
${LIBNOTIFY_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})
endif()

set_property(TARGET slack++ PROPERTY CXX_STANDARD 14)

0 comments on commit e228acc

Please sign in to comment.