Find popt library
This commit is contained in:
parent
931a5c7685
commit
884537fd5f
3 changed files with 16 additions and 1 deletions
|
@ -18,6 +18,9 @@ find_package(purple)
|
|||
set(glib_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(glib)
|
||||
|
||||
set(popt_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(popt)
|
||||
|
||||
set(event_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(event)
|
||||
|
||||
|
|
10
cmake_modules/poptConfig.cmake
Normal file
10
cmake_modules/poptConfig.cmake
Normal file
|
@ -0,0 +1,10 @@
|
|||
FIND_LIBRARY(POPT_LIBRARY NAMES popt)
|
||||
FIND_PATH(POPT_INCLUDE_DIR NAMES "popt.h")
|
||||
|
||||
|
||||
if( POPT_LIBRARY AND POPT_INCLUDE_DIR )
|
||||
message( STATUS "Found popt: ${POPT_LIBRARY}, ${POPT_INCLUDE_DIR}")
|
||||
set( POPT_FOUND 1 )
|
||||
else( POPT_LIBRARY AND POPT_INCLUDE_DIR )
|
||||
message( STATUS "Could NOT find popt" )
|
||||
endif( POPT_LIBRARY AND POPT_INCLUDE_DIR )
|
|
@ -15,12 +15,14 @@ if (CPPUNIT_FOUND)
|
|||
target_link_libraries(libtransport_test transport ${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES})
|
||||
endif()
|
||||
|
||||
include_directories(${POPT_INCLUDE_DIR})
|
||||
|
||||
# SOURCE_GROUP(headers FILES ${HEADERS})
|
||||
|
||||
ADD_LIBRARY(transport SHARED ${HEADERS} ${SRC} ${SWIFTEN_SRC} ${PROTOBUF_SRC} ${PROTOBUF_HDRS})
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
|
||||
TARGET_LINK_LIBRARIES(transport ${Boost_LIBRARIES} ${SQLITE3_LIBRARIES} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${PROTOBUF_LIBRARIES} ${LOG4CXX_LIBRARIES} -lpopt)
|
||||
TARGET_LINK_LIBRARIES(transport ${Boost_LIBRARIES} ${SQLITE3_LIBRARIES} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${PROTOBUF_LIBRARIES} ${LOG4CXX_LIBRARIES} ${POPT_LIBRARY})
|
||||
|
||||
SET_TARGET_PROPERTIES(transport PROPERTIES
|
||||
VERSION ${TRANSPORT_VERSION} SOVERSION ${TRANSPORT_VERSION}
|
||||
|
|
Loading…
Add table
Reference in a new issue