OSDN Git Service

okular: merge OkularConfigureChecks.cmake into main CMKaeLists.txt file
authorIvailo Monev <xakepa10@gmail.com>
Mon, 3 Oct 2022 10:46:20 +0000 (13:46 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 3 Oct 2022 10:46:20 +0000 (13:46 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
okular/CMakeLists.txt
okular/OkularConfigureChecks.cmake [deleted file]

index 787c256..1f94b1a 100644 (file)
@@ -67,6 +67,18 @@ add_feature_info(okular_kpsewhich
     "DVI support in Okular"
 )
 
+option(
+    OKULAR_FORCE_DRM
+    "Forces okular to check for DRM to decide if you can copy/print protected pdf. (default=no)"
+    OFF
+)
+kde4_bool_to_01(OKULAR_FORCE_DRM _OKULAR_FORCE_DRM)
+
+configure_file(
+   ${CMAKE_CURRENT_SOURCE_DIR}/config-okular.h.cmake
+   ${CMAKE_CURRENT_BINARY_DIR}/config-okular.h
+)
+
 add_subdirectory( ui )
 add_subdirectory( shell )
 add_subdirectory( generators )
@@ -75,8 +87,6 @@ if(ENABLE_TESTING)
     add_subdirectory( tests )
 endif()
 
-include(OkularConfigureChecks.cmake)
-
 set(MATH_LIB m)
 
 # okularcore
diff --git a/okular/OkularConfigureChecks.cmake b/okular/OkularConfigureChecks.cmake
deleted file mode 100644 (file)
index 70fe876..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-option(
-   OKULAR_FORCE_DRM
-   "Forces okular to check for DRM to decide if you can copy/print protected pdf. (default=no)"
-   OFF
-)
-if (OKULAR_FORCE_DRM)
-   set(_OKULAR_FORCE_DRM 1)
-else (OKULAR_FORCE_DRM)
-   set(_OKULAR_FORCE_DRM 0)
-endif (OKULAR_FORCE_DRM)
-
-# at the end, output the configuration
-configure_file(
-   ${CMAKE_CURRENT_SOURCE_DIR}/config-okular.h.cmake
-   ${CMAKE_CURRENT_BINARY_DIR}/config-okular.h
-)
-