1
0
mirror of https://github.com/pdewacht/brlaser synced 2024-12-27 07:48:21 +01:00

Merge pull request #19 from StijnDW/master

Allow the user to define cups config variables
This commit is contained in:
Peter De Wachter 2018-02-17 19:04:27 +01:00 committed by GitHub
commit a521498233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 22 deletions

View File

@ -54,26 +54,37 @@ find_program(CUPS_CONFIG NAMES cups-config)
if(NOT CUPS_CONFIG) if(NOT CUPS_CONFIG)
message(FATAL_ERROR "cups-config command not found. Are the CUPS development packages installed?") message(FATAL_ERROR "cups-config command not found. Are the CUPS development packages installed?")
endif() endif()
execute_process(
if(NOT CUPS_DATA_DIR)
execute_process(
COMMAND "${CUPS_CONFIG}" --datadir COMMAND "${CUPS_CONFIG}" --datadir
OUTPUT_VARIABLE CUPS_DATA_DIR OUTPUT_VARIABLE CUPS_DATA_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process( endif()
if(NOT CUPS_SERVER_BIN)
execute_process(
COMMAND "${CUPS_CONFIG}" --serverbin COMMAND "${CUPS_CONFIG}" --serverbin
OUTPUT_VARIABLE CUPS_SERVER_BIN OUTPUT_VARIABLE CUPS_SERVER_BIN
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process( endif()
if(NOT CUPS_CFLAGS)
execute_process(
COMMAND "${CUPS_CONFIG}" --cflags COMMAND "${CUPS_CONFIG}" --cflags
OUTPUT_VARIABLE CUPS_CFLAGS OUTPUT_VARIABLE CUPS_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process( endif()
if(NOT CUPS_LDFLAGS)
execute_process(
COMMAND "${CUPS_CONFIG}" --ldflags COMMAND "${CUPS_CONFIG}" --ldflags
OUTPUT_VARIABLE CUPS_LDFLAGS OUTPUT_VARIABLE CUPS_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process( endif()
if(NOT CUPS_LIBS)
execute_process(
COMMAND "${CUPS_CONFIG}" --image --libs COMMAND "${CUPS_CONFIG}" --image --libs
OUTPUT_VARIABLE CUPS_LIBS OUTPUT_VARIABLE CUPS_LIBS
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
cmake_push_check_state() cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${CUPS_CFLAGS}") set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${CUPS_CFLAGS}")

View File

@ -38,8 +38,8 @@ Installation
------------ ------------
Some operating systems already ship this driver. This is the case for Some operating systems already ship this driver. This is the case for
at least Debian, Ubuntu, Raspbian, openSUSE and Arch Linux. Look for a at least Debian, Ubuntu, Raspbian, openSUSE, NixOS and Arch Linux.
package named `printer-driver-brlaser`. Look for a package named `printer-driver-brlaser`.
You'll also need Ghostscript, in case that's not installed You'll also need Ghostscript, in case that's not installed
automatically. automatically.