David PHAM-VAN

Format CMakeLists

@@ -19,19 +19,23 @@ project(${PROJECT_NAME} LANGUAGES CXX) @@ -19,19 +19,23 @@ project(${PROJECT_NAME} LANGUAGES CXX)
19 set(PDFIUM_VERSION "4627") 19 set(PDFIUM_VERSION "4627")
20 20
21 if(${PDFIUM_VERSION} STREQUAL "latest") 21 if(${PDFIUM_VERSION} STREQUAL "latest")
22 - set(PDFIUM_URL "https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux.tgz") 22 + set(
  23 + PDFIUM_URL
  24 + "https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux.tgz"
  25 + )
23 else() 26 else()
24 - set(PDFIUM_URL "https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_VERSION}/pdfium-linux.tgz") 27 + set(
  28 + PDFIUM_URL
  29 + "https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_VERSION}/pdfium-linux.tgz"
  30 + )
25 endif() 31 endif()
26 32
27 # Download pdfium 33 # Download pdfium
28 include(../windows/DownloadProject.cmake) 34 include(../windows/DownloadProject.cmake)
29 -download_project(  
30 - PROJ  
31 - pdfium  
32 - URL  
33 - ${PDFIUM_URL}  
34 - ) 35 +download_project(PROJ
  36 + pdfium
  37 + URL
  38 + ${PDFIUM_URL})
35 39
36 # This value is used when generating builds using this plugin, so it must not be 40 # This value is used when generating builds using this plugin, so it must not be
37 # changed 41 # changed
@@ -41,14 +45,16 @@ include(${pdfium_SOURCE_DIR}/PDFiumConfig.cmake) @@ -41,14 +45,16 @@ include(${pdfium_SOURCE_DIR}/PDFiumConfig.cmake)
41 45
42 # System-level dependencies. 46 # System-level dependencies.
43 find_package(PkgConfig REQUIRED) 47 find_package(PkgConfig REQUIRED)
44 -pkg_check_modules(GTKUnixPrint REQUIRED IMPORTED_TARGET gtk+-unix-print-3.0) 48 +pkg_check_modules(GTKUnixPrint
  49 + REQUIRED
  50 + IMPORTED_TARGET
  51 + gtk+-unix-print-3.0)
45 52
46 add_library(${PLUGIN_NAME} SHARED 53 add_library(${PLUGIN_NAME} SHARED
47 "printing_plugin.cc" 54 "printing_plugin.cc"
48 "include/printing/printing_plugin.h" 55 "include/printing/printing_plugin.h"
49 "print_job.cc" 56 "print_job.cc"
50 - "print_job.h"  
51 - ) 57 + "print_job.h")
52 58
53 apply_standard_settings(${PLUGIN_NAME}) 59 apply_standard_settings(${PLUGIN_NAME})
54 set_target_properties(${PLUGIN_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden) 60 set_target_properties(${PLUGIN_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
@@ -56,7 +62,8 @@ target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) @@ -56,7 +62,8 @@ target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)
56 target_include_directories(${PLUGIN_NAME} 62 target_include_directories(${PLUGIN_NAME}
57 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include") 63 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
58 target_link_libraries(${PLUGIN_NAME} PRIVATE flutter) 64 target_link_libraries(${PLUGIN_NAME} PRIVATE flutter)
59 -target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK PkgConfig::GTKUnixPrint) 65 +target_link_libraries(${PLUGIN_NAME}
  66 + PRIVATE PkgConfig::GTK PkgConfig::GTKUnixPrint)
60 target_link_libraries(${PLUGIN_NAME} PRIVATE pdfium) 67 target_link_libraries(${PLUGIN_NAME} PRIVATE pdfium)
61 get_filename_component(PDFium_lib_path "${PDFium_LIBRARY}" DIRECTORY) 68 get_filename_component(PDFium_lib_path "${PDFium_LIBRARY}" DIRECTORY)
62 set_target_properties(${PLUGIN_NAME} 69 set_target_properties(${PLUGIN_NAME}
@@ -68,6 +75,4 @@ set_target_properties(${PLUGIN_NAME} @@ -68,6 +75,4 @@ set_target_properties(${PLUGIN_NAME}
68 "$ORIGIN:${PDFium_lib_path}") 75 "$ORIGIN:${PDFium_lib_path}")
69 76
70 # List of absolute paths to libraries that should be bundled with the plugin 77 # List of absolute paths to libraries that should be bundled with the plugin
71 -set(printing_bundled_libraries  
72 - "${PDFium_LIBRARY}"  
73 - PARENT_SCOPE) 78 +set(printing_bundled_libraries "${PDFium_LIBRARY}" PARENT_SCOPE)
@@ -20,19 +20,23 @@ set(ARCH "x64") @@ -20,19 +20,23 @@ set(ARCH "x64")
20 set(PDFIUM_VERSION "4627") 20 set(PDFIUM_VERSION "4627")
21 21
22 if(${PDFIUM_VERSION} STREQUAL "latest") 22 if(${PDFIUM_VERSION} STREQUAL "latest")
23 - set(PDFIUM_URL "https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-windows-${ARCH}.zip") 23 + set(
  24 + PDFIUM_URL
  25 + "https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-windows-${ARCH}.zip"
  26 + )
24 else() 27 else()
25 - set(PDFIUM_URL "https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_VERSION}/pdfium-windows-${ARCH}.zip") 28 + set(
  29 + PDFIUM_URL
  30 + "https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_VERSION}/pdfium-windows-${ARCH}.zip"
  31 + )
26 endif() 32 endif()
27 33
28 # Download pdfium 34 # Download pdfium
29 include(../windows/DownloadProject.cmake) 35 include(../windows/DownloadProject.cmake)
30 -download_project(  
31 - PROJ  
32 - pdfium  
33 - URL  
34 - ${PDFIUM_URL}  
35 - ) 36 +download_project(PROJ
  37 + pdfium
  38 + URL
  39 + ${PDFIUM_URL})
36 40
37 # This value is used when generating builds using this plugin, so it must not be 41 # This value is used when generating builds using this plugin, so it must not be
38 # changed 42 # changed
@@ -57,6 +61,4 @@ target_link_libraries(${PLUGIN_NAME} @@ -57,6 +61,4 @@ target_link_libraries(${PLUGIN_NAME}
57 PRIVATE pdfium flutter flutter_wrapper_plugin) 61 PRIVATE pdfium flutter flutter_wrapper_plugin)
58 62
59 # List of absolute paths to libraries that should be bundled with the plugin 63 # List of absolute paths to libraries that should be bundled with the plugin
60 -set(printing_bundled_libraries  
61 - "${PDFium_LIBRARY}"  
62 - PARENT_SCOPE) 64 +set(printing_bundled_libraries "${PDFium_LIBRARY}" PARENT_SCOPE)