buildsystem: check if we have zlib, openssl and pthread before using

This commit is contained in:
Brad Hards 2011-07-31 11:22:09 +10:00
parent 52e6cd6717
commit 05e6a68927
3 changed files with 12 additions and 4 deletions

View File

@ -51,6 +51,10 @@ check_include_files(netdb.h HAVE_NETDB_H)
check_include_files(fcntl.h HAVE_FCNTL_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
test_big_endian(BIG_ENDIAN)

View File

@ -18,6 +18,8 @@
# limitations under the License.
add_definitions(-DEXT_PATH="/usr/lib/freerdp/extensions")
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${ZLIB_INCLUDE_DIRS})
set(LIBFREERDP_CORE_SRCS
activation.c
@ -80,9 +82,8 @@ set(LIBFREERDP_CORE_SRCS
add_library(freerdp-core SHARED ${LIBFREERDP_CORE_SRCS})
target_link_libraries(freerdp-core z)
target_link_libraries(freerdp-core ssl)
target_link_libraries(freerdp-core crypto)
target_link_libraries(freerdp-core ${ZLIB_LIBRARIES})
target_link_libraries(freerdp-core ${OPENSSL_LIBRARIES})
target_link_libraries(freerdp-core freerdp-utils)
install(TARGETS freerdp-core DESTINATION lib)

View File

@ -17,6 +17,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(CMAKE_THREAD_PREFER_PTHREAD)
find_package(Threads REQUIRED)
set(FREERDP_UTILS_SRCS
args.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})
target_link_libraries(freerdp-utils pthread)
target_link_libraries(freerdp-utils ${CMAKE_THREAD_LIBS_INIT})
install(TARGETS freerdp-utils DESTINATION lib)