mirror of
https://github.com/Silicondust/libhdhomerun
synced 2025-08-20 13:33:29 -07:00
Update CMakeLists.txt
This commit is contained in:
parent
85e043ec44
commit
2333bb7ef6
1 changed files with 4 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8.4)
|
||||||
|
|
||||||
project(hdhomerun)
|
project(hdhomerun)
|
||||||
|
|
||||||
|
@ -27,22 +27,22 @@ set(HEADERS
|
||||||
hdhomerun_sock.h
|
hdhomerun_sock.h
|
||||||
hdhomerun_types.h
|
hdhomerun_types.h
|
||||||
hdhomerun_os.h
|
hdhomerun_os.h
|
||||||
|
hdhomerun_os_posix.h
|
||||||
|
hdhomerun_os_windows.h
|
||||||
hdhomerun_video.h)
|
hdhomerun_video.h)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
LIST(APPEND SOURCES hdhomerun_os_windows.c)
|
LIST(APPEND SOURCES hdhomerun_os_windows.c)
|
||||||
LIST(APPEND SOURCES hdhomerun_sock_windows.c)
|
LIST(APPEND SOURCES hdhomerun_sock_windows.c)
|
||||||
LIST(APPEND HEADERS hdhomerun_os_windows.h)
|
|
||||||
else()
|
else()
|
||||||
LIST(APPEND SOURCES hdhomerun_os_posix.c)
|
LIST(APPEND SOURCES hdhomerun_os_posix.c)
|
||||||
LIST(APPEND SOURCES hdhomerun_sock_posix.c)
|
LIST(APPEND SOURCES hdhomerun_sock_posix.c)
|
||||||
LIST(APPEND HEADERS hdhomerun_os_posix.h)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND DEPLIBS ws2_32 iphlpapi)
|
list(APPEND DEPLIBS ws2_32 iphlpapi)
|
||||||
else()
|
else()
|
||||||
check_library_exists(pthreads pthread_create HAVE_LIBTHREAD)
|
check_library_exists(pthreads pthread_create "" HAVE_LIBTHREAD)
|
||||||
check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET)
|
check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET)
|
||||||
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
|
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
|
||||||
if (HAVE_LIBTHREADS)
|
if (HAVE_LIBTHREADS)
|
||||||
|
@ -56,11 +56,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE "CXX")
|
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(hdhomerun SHARED ${SOURCES})
|
add_library(hdhomerun SHARED ${SOURCES})
|
||||||
target_link_libraries(hdhomerun ${DEPLIBS})
|
target_link_libraries(hdhomerun ${DEPLIBS})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue