diff --git a/CMakeLists.txt b/CMakeLists.txt index a431b0f..ff64818 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,11 @@ project (dublin-traceroute) set (dublin-traceroute_VERSION_MAJOR_0) set (dublin-traceroute_VERSION_MINOR_2) +# ensure that /usr/local is used to find dependencies. This is especially +# necessary for brew on OSX and for libraries installed manually under +# /usr/local +list(APPEND CMAKE_PREFIX_PATH /usr/local) + include_directories("${PROJECT_SOURCE_DIR}/include") add_library(dublintraceroute SHARED @@ -13,6 +18,12 @@ add_library(dublintraceroute SHARED src/traceroute_results.cc ) +# Set the shared library version +set_target_properties(dublintraceroute + PROPERTIES + SOVERSION 0.0.0 + ) + find_package(PkgConfig) find_package(Threads REQUIRED) find_package(libtins 3.4) @@ -26,7 +37,7 @@ endif (${libtins_FOUND}) pkg_search_module(JSONCPP REQUIRED jsoncpp) add_executable(dublin-traceroute src/main.cc) -target_link_libraries (dublintraceroute ${CMAKE_THREAD_LIBS_INIT}) +target_link_libraries(dublintraceroute ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(dublin-traceroute dublintraceroute) target_link_libraries(dublintraceroute tins)