buildsystem: check if we have zlib, openssl and pthread before using
This commit is contained in:
parent
52e6cd6717
commit
05e6a68927
@ -51,6 +51,10 @@ check_include_files(netdb.h HAVE_NETDB_H)
|
|||||||
check_include_files(fcntl.h HAVE_FCNTL_H)
|
check_include_files(fcntl.h HAVE_FCNTL_H)
|
||||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||||
|
|
||||||
|
# Libraries that we have a hard dependency on
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
# Endian
|
# Endian
|
||||||
test_big_endian(BIG_ENDIAN)
|
test_big_endian(BIG_ENDIAN)
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
add_definitions(-DEXT_PATH="/usr/lib/freerdp/extensions")
|
add_definitions(-DEXT_PATH="/usr/lib/freerdp/extensions")
|
||||||
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||||
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||||
|
|
||||||
set(LIBFREERDP_CORE_SRCS
|
set(LIBFREERDP_CORE_SRCS
|
||||||
activation.c
|
activation.c
|
||||||
@ -80,9 +82,8 @@ set(LIBFREERDP_CORE_SRCS
|
|||||||
|
|
||||||
add_library(freerdp-core SHARED ${LIBFREERDP_CORE_SRCS})
|
add_library(freerdp-core SHARED ${LIBFREERDP_CORE_SRCS})
|
||||||
|
|
||||||
target_link_libraries(freerdp-core z)
|
target_link_libraries(freerdp-core ${ZLIB_LIBRARIES})
|
||||||
target_link_libraries(freerdp-core ssl)
|
target_link_libraries(freerdp-core ${OPENSSL_LIBRARIES})
|
||||||
target_link_libraries(freerdp-core crypto)
|
|
||||||
target_link_libraries(freerdp-core freerdp-utils)
|
target_link_libraries(freerdp-core freerdp-utils)
|
||||||
|
|
||||||
install(TARGETS freerdp-core DESTINATION lib)
|
install(TARGETS freerdp-core DESTINATION lib)
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
set(CMAKE_THREAD_PREFER_PTHREAD)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
set(FREERDP_UTILS_SRCS
|
set(FREERDP_UTILS_SRCS
|
||||||
args.c
|
args.c
|
||||||
blob.c
|
blob.c
|
||||||
@ -37,6 +40,6 @@ add_library(freerdp-utils SHARED ${FREERDP_UTILS_SRCS})
|
|||||||
|
|
||||||
set_target_properties(freerdp-utils PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION})
|
set_target_properties(freerdp-utils PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION})
|
||||||
|
|
||||||
target_link_libraries(freerdp-utils pthread)
|
target_link_libraries(freerdp-utils ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
install(TARGETS freerdp-utils DESTINATION lib)
|
install(TARGETS freerdp-utils DESTINATION lib)
|
||||||
|
Loading…
Reference in New Issue
Block a user