inserted find_optional_package to require or ignore opional packages

This commit is contained in:
Nils Andresen 2011-08-30 20:38:05 +02:00
parent a9a06abcc3
commit 3adf0875ca
4 changed files with 7 additions and 7 deletions

View File

@ -111,7 +111,7 @@ if(APPLE)
endif() endif()
# Build CUnit # Build CUnit
find_package(CUnit) find_optional_package(CUnit)
if(CUNIT_FOUND) if(CUNIT_FOUND)
add_subdirectory(cunit) add_subdirectory(cunit)
enable_testing() enable_testing()

View File

@ -25,13 +25,13 @@ if(NOT WIN32)
add_subdirectory(test) add_subdirectory(test)
# Build X11 Client # Build X11 Client
find_package(X11) find_optional_package(X11)
if(X11_FOUND) if(X11_FOUND)
add_subdirectory(X11) add_subdirectory(X11)
endif() endif()
# Build DirectFB Client # Build DirectFB Client
find_package(DirectFB) find_optional_package(DirectFB)
if(DIRECTFB_FOUND) if(DIRECTFB_FOUND)
add_subdirectory(DirectFB) add_subdirectory(DirectFB)
endif() endif()

View File

@ -44,21 +44,21 @@ if(WITH_MANPAGES)
install(FILES xfreerdp.1 DESTINATION share/man/man1) install(FILES xfreerdp.1 DESTINATION share/man/man1)
endif() endif()
find_package(Xinerama) find_optional_package(Xinerama)
if(XINERAMA_FOUND) if(XINERAMA_FOUND)
add_definitions(-DWITH_XINERAMA -DWITH_XEXT) add_definitions(-DWITH_XINERAMA -DWITH_XEXT)
include_directories(${XINERAMA_INCLUDE_DIRS}) include_directories(${XINERAMA_INCLUDE_DIRS})
target_link_libraries(xfreerdp ${XINERAMA_LIBRARIES}) target_link_libraries(xfreerdp ${XINERAMA_LIBRARIES})
endif() endif()
find_package(Xext) find_optional_package(Xext)
if(XEXT_FOUND) if(XEXT_FOUND)
add_definitions(-DWITH_XEXT) add_definitions(-DWITH_XEXT)
include_directories(${XEXT_INCLUDE_DIRS}) include_directories(${XEXT_INCLUDE_DIRS})
target_link_libraries(xfreerdp ${XEXT_LIBRARIES}) target_link_libraries(xfreerdp ${XEXT_LIBRARIES})
endif() endif()
find_package(Xcursor) find_optional_package(Xcursor)
if(Xcursor_FOUND) if(Xcursor_FOUND)
add_definitions(-DWITH_XCURSOR) add_definitions(-DWITH_XCURSOR)
include_directories(${Xcursor_INCLUDE_DIRS}) include_directories(${Xcursor_INCLUDE_DIRS})

View File

@ -29,7 +29,7 @@ set(FREERDP_KBD_SRCS
add_library(freerdp-kbd SHARED ${FREERDP_KBD_SRCS}) add_library(freerdp-kbd SHARED ${FREERDP_KBD_SRCS})
find_package(XKBFile) find_optional_package(XKBFile)
if(XKBFILE_FOUND) if(XKBFILE_FOUND)
add_definitions(-DWITH_XKBFILE) add_definitions(-DWITH_XKBFILE)
include_directories(${XKBFILE_INCLUDE_DIRS}) include_directories(${XKBFILE_INCLUDE_DIRS})