mirror of
https://github.com/Silicondust/libhdhomerun
synced 2025-08-21 05:53:29 -07:00
Update CMakeLists.txt
This commit is contained in:
parent
deae6bbc3e
commit
85e043ec44
1 changed files with 15 additions and 5 deletions
|
@ -42,11 +42,18 @@ endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND DEPLIBS ws2_32 iphlpapi)
|
list(APPEND DEPLIBS ws2_32 iphlpapi)
|
||||||
else()
|
else()
|
||||||
list(APPEND DEPLIBS pthread)
|
check_library_exists(pthreads pthread_create HAVE_LIBTHREAD)
|
||||||
check_library_exists(rt clock_gettime "" HAS_LIBRT)
|
check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET)
|
||||||
if (HAS_LIBRT)
|
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
|
||||||
|
if (HAVE_LIBTHREADS)
|
||||||
|
list(APPEND DEPLIBS pthreads)
|
||||||
|
endif()
|
||||||
|
if (HAVE_LIBRT)
|
||||||
list(APPEND DEPLIBS rt)
|
list(APPEND DEPLIBS rt)
|
||||||
endif()
|
endif()
|
||||||
|
if (HAVE_LIBSOCKET)
|
||||||
|
list(APPEND DEPLIBS socket)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
@ -57,6 +64,9 @@ endif()
|
||||||
add_library(hdhomerun SHARED ${SOURCES})
|
add_library(hdhomerun SHARED ${SOURCES})
|
||||||
target_link_libraries(hdhomerun ${DEPLIBS})
|
target_link_libraries(hdhomerun ${DEPLIBS})
|
||||||
|
|
||||||
|
add_library(hdhomerun_static STATIC ${SOURCES})
|
||||||
|
target_link_libraries(hdhomerun_static ${DEPLIBS})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(hdhomerun PROPERTIES DEFINE_SYMBOL "LIBHDHOMERUN_DLLEXPORT")
|
set_target_properties(hdhomerun PROPERTIES DEFINE_SYMBOL "LIBHDHOMERUN_DLLEXPORT")
|
||||||
endif()
|
endif()
|
||||||
|
@ -67,7 +77,7 @@ target_link_libraries(hdhomerun_config hdhomerun)
|
||||||
include_directories(${PROJECT_SOURCE_DIR})
|
include_directories(${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
install(FILES ${HEADERS} DESTINATION include/hdhomerun)
|
install(FILES ${HEADERS} DESTINATION include/hdhomerun)
|
||||||
install(TARGETS hdhomerun hdhomerun_config
|
install(TARGETS hdhomerun hdhomerun_static hdhomerun_config
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue