Merge pull request #362 from bmiklautz/buildsystemfixes
Build system fixes
This commit is contained in:
commit
d5211588e1
@ -65,6 +65,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable")
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
endif()
|
||||
if(WITH_SSE2_TARGET)
|
||||
@ -139,7 +140,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc DESTINATION ${CMAKE_INSTALL
|
||||
|
||||
# Build CUnit
|
||||
find_optional_package(CUnit)
|
||||
if(CUNIT_FOUND)
|
||||
if(WITH_CUNIT)
|
||||
enable_testing()
|
||||
add_subdirectory(cunit)
|
||||
endif()
|
||||
|
@ -31,11 +31,11 @@ target_link_libraries(audin freerdp-utils)
|
||||
|
||||
install(TARGETS audin DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
||||
if(ALSA_FOUND)
|
||||
if(WITH_ALSA)
|
||||
add_subdirectory(alsa)
|
||||
endif()
|
||||
|
||||
if(PULSE_FOUND)
|
||||
if(WITH_PULSEAUDIO)
|
||||
add_subdirectory(pulse)
|
||||
endif()
|
||||
|
||||
|
@ -43,15 +43,15 @@ target_link_libraries(tsmf freerdp-utils)
|
||||
|
||||
install(TARGETS tsmf DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
||||
if(FFMPEG_FOUND)
|
||||
if(WITH_FFMPEG)
|
||||
add_subdirectory(ffmpeg)
|
||||
endif()
|
||||
|
||||
if(ALSA_FOUND)
|
||||
if(WITH_ALSA)
|
||||
add_subdirectory(alsa)
|
||||
endif()
|
||||
|
||||
if(PULSE_FOUND)
|
||||
if(WITH_PULSEAUDIO)
|
||||
add_subdirectory(pulse)
|
||||
endif()
|
||||
|
||||
|
@ -42,6 +42,6 @@ add_subdirectory(printer)
|
||||
add_subdirectory(parallel)
|
||||
add_subdirectory(serial)
|
||||
|
||||
if(PCSC_FOUND)
|
||||
if(WITH_PCSC)
|
||||
add_subdirectory(smartcard)
|
||||
endif()
|
||||
|
@ -22,13 +22,14 @@ set(PRINTER_SRCS
|
||||
printer_main.h
|
||||
)
|
||||
|
||||
if(CUPS_FOUND)
|
||||
if(WITH_CUPS)
|
||||
set(PRINTER_SRCS
|
||||
${PRINTER_SRCS}
|
||||
printer_cups.c
|
||||
printer_cups.h
|
||||
)
|
||||
include_directories(${CUPS_INCLUDE_DIR})
|
||||
add_definitions(-DWITH_CUPS)
|
||||
endif()
|
||||
|
||||
include_directories(..)
|
||||
@ -38,7 +39,7 @@ set_target_properties(printer PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(printer freerdp-utils)
|
||||
|
||||
if(CUPS_FOUND)
|
||||
if(WITH_CUPS)
|
||||
target_link_libraries(printer ${CUPS_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_types.h"
|
||||
|
||||
#ifdef CUPS_FOUND
|
||||
#ifdef WITH_CUPS
|
||||
#include "printer_cups.h"
|
||||
#endif
|
||||
|
||||
@ -300,7 +300,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
|
||||
char* name;
|
||||
char* driver_name;
|
||||
|
||||
#ifdef CUPS_FOUND
|
||||
#ifdef WITH_CUPS
|
||||
driver = printer_cups_get_driver();
|
||||
#endif
|
||||
if (driver == NULL)
|
||||
|
@ -29,11 +29,11 @@ target_link_libraries(rdpsnd freerdp-utils)
|
||||
|
||||
install(TARGETS rdpsnd DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
||||
if(ALSA_FOUND)
|
||||
if(WITH_ALSA)
|
||||
add_subdirectory(alsa)
|
||||
endif()
|
||||
|
||||
if(PULSE_FOUND)
|
||||
if(WITH_PULSEAUDIO)
|
||||
add_subdirectory(pulse)
|
||||
endif()
|
||||
|
||||
|
@ -25,13 +25,13 @@ if(NOT WIN32)
|
||||
|
||||
# Build X11 Client
|
||||
find_suggested_package(X11)
|
||||
if(X11_FOUND)
|
||||
if(WITH_X11)
|
||||
add_subdirectory(X11)
|
||||
endif()
|
||||
|
||||
# Build DirectFB Client
|
||||
find_optional_package(DirectFB)
|
||||
if(DIRECTFB_FOUND)
|
||||
if(WITH_DIRECTFB)
|
||||
add_subdirectory(DirectFB)
|
||||
endif()
|
||||
else()
|
||||
|
@ -58,28 +58,28 @@ if(WITH_MANPAGES)
|
||||
endif(WITH_MANPAGES)
|
||||
|
||||
find_suggested_package(Xinerama)
|
||||
if(XINERAMA_FOUND)
|
||||
if(WITH_XINERAMA)
|
||||
add_definitions(-DWITH_XINERAMA -DWITH_XEXT)
|
||||
include_directories(${XINERAMA_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp ${XINERAMA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_suggested_package(Xext)
|
||||
if(XEXT_FOUND)
|
||||
if(WITH_XEXT)
|
||||
add_definitions(-DWITH_XEXT)
|
||||
include_directories(${XEXT_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp ${XEXT_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_suggested_package(Xcursor)
|
||||
if(XCURSOR_FOUND)
|
||||
if(WITH_XCURSOR)
|
||||
add_definitions(-DWITH_XCURSOR)
|
||||
include_directories(${XCURSOR_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp ${XCURSOR_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_suggested_package(Xv)
|
||||
if(XV_FOUND)
|
||||
if(WITH_XV)
|
||||
add_definitions(-DWITH_XV)
|
||||
include_directories(${XV_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp ${XV_LIBRARIES})
|
||||
|
@ -37,7 +37,7 @@ find_library(CUNIT_LIBRARY NAMES cunit
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUNIT DEFAULT_MSG CUNIT_LIBRARY CUNIT_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUnit DEFAULT_MSG CUNIT_LIBRARY CUNIT_INCLUDE_DIR)
|
||||
|
||||
if(CUNIT_FOUND)
|
||||
set( CUNIT_LIBRARIES ${CUNIT_LIBRARY} )
|
||||
|
@ -38,7 +38,7 @@ find_library(DIRECTFB_LIBRARY NAMES directfb
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DIRECTFB DEFAULT_MSG DIRECTFB_LIBRARY DIRECTFB_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectFB DEFAULT_MSG DIRECTFB_LIBRARY DIRECTFB_INCLUDE_DIR)
|
||||
|
||||
if(DIRECTFB_FOUND)
|
||||
set( DIRECTFB_LIBRARIES ${DIRECTFB_LIBRARY} )
|
||||
|
@ -1 +1 @@
|
||||
pkg_check_modules(PULSE libpulse)
|
||||
pkg_check_modules(PULSEAUDIO libpulse)
|
||||
|
@ -38,7 +38,7 @@ find_library(XKBFILE_LIBRARY NAMES xkbfile
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XKBFILE DEFAULT_MSG XKBFILE_LIBRARY XKBFILE_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XKBFile DEFAULT_MSG XKBFILE_LIBRARY XKBFILE_INCLUDE_DIR)
|
||||
|
||||
if(XKBFILE_FOUND)
|
||||
set( XKBFILE_LIBRARIES ${XKBFILE_LIBRARY} )
|
||||
|
@ -38,7 +38,7 @@ find_library(XSHM_LIBRARY NAMES Xext
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XSHM DEFAULT_MSG XSHM_LIBRARY XSHM_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XShm DEFAULT_MSG XSHM_LIBRARY XSHM_INCLUDE_DIR)
|
||||
|
||||
if(XSHM_FOUND)
|
||||
set( XSHM_LIBRARIES ${XSHM_LIBRARY} )
|
||||
|
@ -38,7 +38,7 @@ find_library(XTEST_LIBRARY NAMES Xtst
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XTEST DEFAULT_MSG XTEST_LIBRARY XTEST_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XTest DEFAULT_MSG XTEST_LIBRARY XTEST_INCLUDE_DIR)
|
||||
|
||||
if(XTEST_FOUND)
|
||||
set( XTEST_LIBRARIES ${XTEST_LIBRARY} )
|
||||
|
@ -38,7 +38,7 @@ find_library(XCURSOR_LIBRARY NAMES Xcursor
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCURSOR DEFAULT_MSG XCURSOR_LIBRARY XCURSOR_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xcursor DEFAULT_MSG XCURSOR_LIBRARY XCURSOR_INCLUDE_DIR)
|
||||
|
||||
if(XCURSOR_FOUND)
|
||||
set( XCURSOR_LIBRARIES ${XCURSOR_LIBRARY} )
|
||||
|
@ -38,11 +38,12 @@ find_library(XDAMAGE_LIBRARY NAMES Xdamage
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XDAMAGE DEFAULT_MSG XDAMAGE_LIBRARY XDAMAGE_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xdamage DEFAULT_MSG XDAMAGE_LIBRARY XDAMAGE_INCLUDE_DIR)
|
||||
|
||||
if(XDAMAGE_FOUND)
|
||||
set( XDAMAGE_LIBRARIES ${XDAMAGE_LIBRARY} )
|
||||
set( XDAMAGE_INCLUDE_DIRS ${XDAMAGE_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
|
||||
mark_as_advanced(XDAMAGE_INCLUDE_DIR XDAMAGE_LIBRARY)
|
||||
|
@ -38,7 +38,7 @@ find_library(XEXT_LIBRARY NAMES Xext
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XEXT DEFAULT_MSG XEXT_LIBRARY XEXT_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xext DEFAULT_MSG XEXT_LIBRARY XEXT_INCLUDE_DIR)
|
||||
|
||||
if(XEXT_FOUND)
|
||||
set( XEXT_LIBRARIES ${XEXT_LIBRARY} )
|
||||
|
@ -38,7 +38,7 @@ find_library(XFIXES_LIBRARY NAMES Xfixes
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XFIXES DEFAULT_MSG XFIXES_LIBRARY XFIXES_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xfixes DEFAULT_MSG XFIXES_LIBRARY XFIXES_INCLUDE_DIR)
|
||||
|
||||
if(XFIXES_FOUND)
|
||||
set( XFIXES_LIBRARIES ${XFIXES_LIBRARY} )
|
||||
|
@ -38,7 +38,7 @@ find_library(XINERAMA_LIBRARY NAMES Xinerama
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XINERAMA DEFAULT_MSG XINERAMA_LIBRARY XINERAMA_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xinerama DEFAULT_MSG XINERAMA_LIBRARY XINERAMA_INCLUDE_DIR)
|
||||
|
||||
if(XINERAMA_FOUND)
|
||||
set( XINERAMA_LIBRARIES ${XINERAMA_LIBRARY} )
|
||||
|
@ -38,7 +38,7 @@ find_library(XV_LIBRARY NAMES Xv
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XV DEFAULT_MSG XV_LIBRARY XV_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xv DEFAULT_MSG XV_LIBRARY XV_INCLUDE_DIR)
|
||||
|
||||
if(XV_FOUND)
|
||||
set( XV_LIBRARIES ${XV_LIBRARY} )
|
||||
|
@ -18,9 +18,6 @@
|
||||
#cmakedefine HAVE_STDBOOL_H
|
||||
#cmakedefine HAVE_INTTYPES_H
|
||||
|
||||
/* Found packages */
|
||||
#cmakedefine CUPS_FOUND
|
||||
|
||||
/* Endian */
|
||||
#cmakedefine BIG_ENDIAN
|
||||
|
||||
@ -50,5 +47,4 @@
|
||||
#cmakedefine WITH_DEBUG_REDIR
|
||||
#cmakedefine WITH_DEBUG_CLIPRDR
|
||||
#cmakedefine WITH_DEBUG_WND
|
||||
|
||||
#endif
|
||||
|
@ -30,16 +30,18 @@ set(FREERDP_KBD_SRCS
|
||||
add_library(freerdp-kbd ${FREERDP_KBD_SRCS})
|
||||
|
||||
find_suggested_package(X11)
|
||||
if(X11_FOUND)
|
||||
if(WITH_X11)
|
||||
target_link_libraries(freerdp-kbd ${X11_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
find_suggested_package(XKBFile)
|
||||
if(XKBFILE_FOUND)
|
||||
add_definitions(-DWITH_XKBFILE)
|
||||
include_directories(${XKBFILE_INCLUDE_DIRS})
|
||||
target_link_libraries(freerdp-kbd ${XKBFILE_LIBRARIES})
|
||||
if(WITH_X11)
|
||||
if(WITH_XKBFILE)
|
||||
add_definitions(-DWITH_XKBFILE)
|
||||
include_directories(${XKBFILE_INCLUDE_DIRS})
|
||||
target_link_libraries(freerdp-kbd ${XKBFILE_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -26,7 +26,7 @@ if(NOT WIN32)
|
||||
|
||||
# Build X11 Server
|
||||
find_suggested_package(X11)
|
||||
if(X11_FOUND)
|
||||
if(WITH_X11)
|
||||
add_subdirectory(X11)
|
||||
endif()
|
||||
|
||||
|
@ -25,34 +25,34 @@ add_executable(xfreerdp-server
|
||||
xfreerdp.c)
|
||||
|
||||
find_suggested_package(XShm)
|
||||
if(XSHM_FOUND)
|
||||
if(WITH_XSHM)
|
||||
add_definitions(-DWITH_XSHM)
|
||||
include_directories(${XSHM_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
find_suggested_package(Xext)
|
||||
if(XEXT_FOUND)
|
||||
if(WITH_XEXT)
|
||||
add_definitions(-DWITH_XEXT)
|
||||
include_directories(${XEXT_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp-server ${XEXT_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_suggested_package(Xdamage)
|
||||
if(XDAMAGE_FOUND)
|
||||
if(WITH_XDAMAGE)
|
||||
add_definitions(-DWITH_XDAMAGE)
|
||||
include_directories(${XDAMAGE_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp-server ${XDAMAGE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_suggested_package(Xfixes)
|
||||
if(XFIXES_FOUND)
|
||||
if(WITH_XFIXES)
|
||||
add_definitions(-DWITH_XFIXES)
|
||||
include_directories(${XFIXES_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp-server ${XFIXES_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_suggested_package(XTest)
|
||||
if(XTEST_FOUND)
|
||||
if(WITH_XTEST)
|
||||
add_definitions(-DWITH_XTEST)
|
||||
include_directories(${XTEST_INCLUDE_DIRS})
|
||||
target_link_libraries(xfreerdp-server ${XTEST_LIBRARIES})
|
||||
|
Loading…
Reference in New Issue
Block a user