mirror of
https://github.com/pdewacht/brlaser
synced 2024-12-26 07:28:21 +01:00
Merge pull request #19 from StijnDW/master
Allow the user to define cups config variables
This commit is contained in:
commit
a521498233
@ -54,26 +54,37 @@ find_program(CUPS_CONFIG NAMES cups-config)
|
||||
if(NOT CUPS_CONFIG)
|
||||
message(FATAL_ERROR "cups-config command not found. Are the CUPS development packages installed?")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --datadir
|
||||
OUTPUT_VARIABLE CUPS_DATA_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --serverbin
|
||||
OUTPUT_VARIABLE CUPS_SERVER_BIN
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --cflags
|
||||
OUTPUT_VARIABLE CUPS_CFLAGS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --ldflags
|
||||
OUTPUT_VARIABLE CUPS_LDFLAGS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --image --libs
|
||||
OUTPUT_VARIABLE CUPS_LIBS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT CUPS_DATA_DIR)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --datadir
|
||||
OUTPUT_VARIABLE CUPS_DATA_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT CUPS_SERVER_BIN)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --serverbin
|
||||
OUTPUT_VARIABLE CUPS_SERVER_BIN
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT CUPS_CFLAGS)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --cflags
|
||||
OUTPUT_VARIABLE CUPS_CFLAGS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT CUPS_LDFLAGS)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --ldflags
|
||||
OUTPUT_VARIABLE CUPS_LDFLAGS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT CUPS_LIBS)
|
||||
execute_process(
|
||||
COMMAND "${CUPS_CONFIG}" --image --libs
|
||||
OUTPUT_VARIABLE CUPS_LIBS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${CUPS_CFLAGS}")
|
||||
|
@ -38,8 +38,8 @@ Installation
|
||||
------------
|
||||
|
||||
Some operating systems already ship this driver. This is the case for
|
||||
at least Debian, Ubuntu, Raspbian, openSUSE and Arch Linux. Look for a
|
||||
package named `printer-driver-brlaser`.
|
||||
at least Debian, Ubuntu, Raspbian, openSUSE, NixOS and Arch Linux.
|
||||
Look for a package named `printer-driver-brlaser`.
|
||||
|
||||
You'll also need Ghostscript, in case that's not installed
|
||||
automatically.
|
||||
|
Loading…
Reference in New Issue
Block a user