Skip to content

Commit

Permalink
Beta 2.0.0-beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
SokoloffA committed Dec 30, 2018
1 parent efe575d commit 7033fdc
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ cmake_policy(SET CMP0028 NEW)

project(boomaga)

set(MAJOR_VERSION 1)
set(MINOR_VERSION 3)
set(MAJOR_VERSION 2)
set(MINOR_VERSION 0)
set(PATCH_VERSION 0)
set(BETA_VERSION beta1)
set(FULL_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
if (BETA_VERSION)
set(FULL_VERSION ${FULL_VERSION}-${BETA_VERSION})
endif()


add_definitions(-DMAJOR_VERSION=\"${MAJOR_VERSION}\")
add_definitions(-DMINOR_VERSION=\"${MINOR_VERSION}\")
Expand Down Expand Up @@ -81,17 +86,16 @@ add_definitions(-DNONGUI_DIR=\"${NONGUI_DIR}\")

###########################################################

setByDefault(INSTANCE_NAME "boomaga")
setFirstUpper(CUPS_BACKEND_NAME "${INSTANCE_NAME}")
setFirstUpper(CUPS_BACKEND_NAME "boomaga")

setByDefault(CUPS_BACKEND_URI "${INSTANCE_NAME}:/")
setByDefault(CUPS_BACKEND_URI "boomaga:/")
setByDefault(CUPS_BACKEND_INFO "${CUPS_BACKEND_NAME}")
setByDefault(CUPS_BACKEND_MODEL "${CUPS_BACKEND_NAME} printer")
setByDefault(CUPS_BACKEND_DESCRIPTION "Virtual ${INSTANCE_NAME} printer")
setByDefault(CUPS_BACKEND_DESCRIPTION "Virtual boomaga printer")
setByDefault(CUPS_BACKEND_MANUFACTURER "Generic")

setByDefault(GUI_PROGRAM ${GUI_DIR}/${INSTANCE_NAME})
setByDefault(GUI_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/${INSTANCE_NAME})
setByDefault(GUI_PROGRAM ${GUI_DIR}/boomaga)
setByDefault(GUI_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/boomaga)

setByDefault(CUPS_BACKEND_DIR "${DEF_CUPS_BACKEND_DIR}")
setByDefault(CUPS_FILTER_DIR "${DEF_CUPS_FILTER_DIR}")
Expand All @@ -111,7 +115,6 @@ status_message(" DBUS_MACINE_ID_DIR = ${DBUS_MACINE_ID_DIR}")
status_message(" DBUS_SERVICE_DIR = ${DBUS_SERVICE_DIR}")
status_message(" ")
status_message(" You can change the following options using cmake options:")
status_message(" INSTANCE_NAME = ${INSTANCE_NAME}")
status_message(" CUPS_BACKEND_URI = ${CUPS_BACKEND_URI}")
status_message(" CUPS_BACKEND_INFO = ${CUPS_BACKEND_INFO}")
status_message(" CUPS_BACKEND_MODEL = ${CUPS_BACKEND_MODEL}")
Expand Down
13 changes: 0 additions & 13 deletions src/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,5 @@
# END_COMMON_COPYRIGHT_HEADER


configure_file(${CMAKE_CURRENT_SOURCE_DIR}/boomaga.ppd
${CMAKE_CURRENT_BINARY_DIR}/${INSTANCE_NAME}.ppd
@ONLY)


install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${INSTANCE_NAME}.ppd
DESTINATION ${CUPS_PPD_DIR}
PERMISSIONS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ
)


add_subdirectory(cups_backend)
23 changes: 17 additions & 6 deletions src/backend/cups_backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,34 @@ set(SOURCES
../../common.cpp
)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)


add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES})
target_link_libraries(${PROJECT_NAME})
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "boomaga")

target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)


install(FILES "${CMAKE_CURRENT_BINARY_DIR}/boomaga"
DESTINATION ${CUPS_BACKEND_DIR}
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/boomaga.ppd
${CMAKE_CURRENT_BINARY_DIR}/boomaga.ppd
@ONLY)


install(FILES ${CMAKE_CURRENT_BINARY_DIR}/boomaga.ppd
DESTINATION ${CUPS_PPD_DIR}
PERMISSIONS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ
)

File renamed without changes.
7 changes: 4 additions & 3 deletions src/boomaga/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ qt5_add_resources( QRC_SOURCES ${RESOURCES})
qt5_add_translation(QM_FILES ${TS_FILES})


add_executable(${INSTANCE_NAME} ${HEADERS} ${SOURCES} ${QM_FILES} ${QRC_SOURCES} ${TRANSLATORS_INFO_QRC})
target_link_libraries(${INSTANCE_NAME} ${LIBRARIES} Qt5::Widgets Qt5::PrintSupport Qt5::DBus)
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES} ${QM_FILES} ${QRC_SOURCES} ${TRANSLATORS_INFO_QRC})
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "boomaga")
target_link_libraries(${PROJECT_NAME} ${LIBRARIES} Qt5::Widgets Qt5::PrintSupport Qt5::DBus)


install(TARGETS ${INSTANCE_NAME} RUNTIME DESTINATION ${GUI_DIR})
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${GUI_DIR})
install(FILES ${QM_FILES} DESTINATION ${TRANSLATIONS_DIR})

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.boomaga.service
Expand Down

0 comments on commit 7033fdc

Please sign in to comment.