r24350 by craig - Rename cairo finder variables to remove cmake warning. Remove old cmake

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 22 22:00:27 UTC 2020


Author: craig
Date: Tue Dec 22 22:00:27 2020
New Revision: 24350

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24350
Log:
Rename cairo finder variables to remove cmake warning. Remove old cmake
legacy workaround

Modified:
    trunk/Scribus/CMakeLists_Dependencies.cmake
    trunk/Scribus/cmake/modules/Findcairo.cmake
    trunk/Scribus/scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists_Dependencies.cmake
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24350&path=/trunk/Scribus/CMakeLists_Dependencies.cmake
==============================================================================
--- trunk/Scribus/CMakeLists_Dependencies.cmake	(original)
+++ trunk/Scribus/CMakeLists_Dependencies.cmake	Tue Dec 22 22:00:27 2020
@@ -164,12 +164,12 @@
 endif()
 #>> FreeType2
 
-set(CAIRO_DIR ${CMAKE_MODULE_PATH})
-find_package(CAIRO REQUIRED)
-if(CAIRO_FOUND)
-	message("CAIRO Library Found OK")
-else()
-	message(FATAL_ERROR "No Cairo Found")
+set(cairo_DIR ${CMAKE_MODULE_PATH})
+find_package(cairo REQUIRED)
+if(cairo_FOUND)
+	message("cairo Library found OK")
+else()
+	message(FATAL_ERROR "No cairo library found")
 endif()
 #>>Render Library
 

Modified: trunk/Scribus/cmake/modules/Findcairo.cmake
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24350&path=/trunk/Scribus/cmake/modules/Findcairo.cmake
==============================================================================
--- trunk/Scribus/cmake/modules/Findcairo.cmake	(original)
+++ trunk/Scribus/cmake/modules/Findcairo.cmake	Tue Dec 22 22:00:27 2020
@@ -3,65 +3,66 @@
 #
 
 # This module defines
-# CAIRO_INCLUDE_DIR, where to find art*.h etc
-# CAIRO_LIBRARY, the libraries to link against to use LIBART.
-# CAIRO_FOUND, If false, do not try to use LIBART.
-# CAIRO_LIBS, link information
-# CAIRO_CFLAGS, cflags for include information
+# cairo_INCLUDE_DIR, where to find art*.h etc
+# cairo_LIBRARY, the libraries to link against to use LIBART.
+# cairo_FOUND, If false, do not try to use LIBART.
+# cairo_LIBS, link information
+# cairo_CFLAGS, cflags for include information
 
 
 if(PREFIX_CAIRO)
   message(STATUS "Searching custom cairo location: ${PREFIX_CAIRO}")
-  set(PREFIX_CAIRO_INCLUDE "${PREFIX_CAIRO}/include")
-  set(PREFIX_CAIRO_LIB "${PREFIX_CAIRO}/lib")
-  set(PREFIX_CAIRO_BIN "${PREFIX_CAIRO}/bin")
+  set(PREFIX_cairo_INCLUDE "${PREFIX_CAIRO}/include")
+  set(PREFIX_cairo_LIB "${PREFIX_CAIRO}/lib")
+  set(PREFIX_cairo_BIN "${PREFIX_CAIRO}/bin")
 else(PREFIX_CAIRO)
   # use pkgconfig to get the directories and then use these values
   # in the find_path() and find_library() calls
-  include(FindPkgConfig)
-  pkg_search_module(CAIRO REQUIRED libcairo>=1.14.0 cairo>=1.14.0)
+  #include(FindPkgConfig)
+  find_package(PkgConfig QUIET)
+  pkg_search_module(cairo REQUIRED libcairo>=1.14.0 cairo>=1.14.0)
 endif(PREFIX_CAIRO)
 
-find_path(CAIRO_INCLUDE_DIR 
+find_path(cairo_INCLUDE_DIR
   NAMES cairo.h
-  PATHS ${PREFIX_CAIRO_INCLUDE} ${PKG_CAIRO_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS}
+  PATHS ${PREFIX_cairo_INCLUDE} ${PKG_cairo_INCLUDE_DIRS} ${cairo_INCLUDE_DIRS}
   PATH_SUFFIXES cairo
   NO_DEFAULT_PATH
 )
 
-find_library(CAIRO_LIBRARY
+find_library(cairo_LIBRARY
   NAMES libcairo cairo
-  PATHS ${PREFIX_CAIRO_LIB} ${PKG_CAIRO_LIBRARIES} ${CAIRO_LIBRARY_DIRS}
+  PATHS ${PREFIX_cairo_LIB} ${PKG_cairo_LIBRARIES} ${cairo_LIBRARY_DIRS}
   NO_DEFAULT_PATH
 )
 
-#If we had no cairo prefix specify it, set PREFIX_CAIRO_LIB most importantly, for the 
+#If we had no cairo prefix specify it, set PREFIX_cairo_LIB most importantly, for the
 # if(NOT PREFIX_CAIRO)
-# 	get_filename_component(CAIRO_DIR ${CAIRO_LIBRARY} PATH)
-# 	get_filename_component(CAIRO_DIR ${CAIRO_DIR} PATH)
-# 	set(PREFIX_CAIRO ${CAIRO_DIR})
+# 	get_filename_component(cairo_DIR ${cairo_LIBRARY} PATH)
+# 	get_filename_component(cairo_DIR ${cairo_DIR} PATH)
+# 	set(PREFIX_CAIRO ${cairo_DIR})
 # 	if(PREFIX_CAIRO)
-# 		set(PREFIX_CAIRO_INCLUDE "${PREFIX_CAIRO}/include")
-# 		set(PREFIX_CAIRO_LIB "${PREFIX_CAIRO}/lib")
-# 		set(PREFIX_CAIRO_BIN "${PREFIX_CAIRO}/bin")
+# 		set(PREFIX_cairo_INCLUDE "${PREFIX_CAIRO}/include")
+# 		set(PREFIX_cairo_LIB "${PREFIX_CAIRO}/lib")
+# 		set(PREFIX_cairo_BIN "${PREFIX_CAIRO}/bin")
 # 	endif(PREFIX_CAIRO)
 # endif(NOT PREFIX_CAIRO)
 
-set(CAIRO_FIND_QUIETLY ON)
+set(cairo_FIND_QUIETLY ON)
 
-if (CAIRO_LIBRARY)
-  if (CAIRO_INCLUDE_DIR)
-    set( CAIRO_FOUND "YES" )
-    if(NOT CAIRO_FIND_QUIETLY)
-      message(STATUS "Found cairo: ${CAIRO_LIBRARY}")
-    endif(NOT CAIRO_FIND_QUIETLY)
-    set( CAIRO_LIBRARIES ${CAIRO_LIBRARY} )
+if (cairo_LIBRARY)
+  if (cairo_INCLUDE_DIR)
+	set( cairo_FOUND "YES" )
+	if(NOT cairo_FIND_QUIETLY)
+		message(STATUS "Found cairo: ${cairo_LIBRARY}")
+	endif(NOT cairo_FIND_QUIETLY)
+	set( cairo_LIBRARIES ${cairo_LIBRARY} )
 #     CB: We dont use this yet anyway
-#     find_program(CAIRO_CONFIG 
+#     find_program(cairo_CONFIG
 #       NAMES pkg-config
 #       PATHS ${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin /usr/nekoware/bin /usr/X11/bin
 #     )
-#     exec_program(${CAIRO_CONFIG} ARGS "--libs cairo" OUTPUT_VARIABLE CAIRO_LIBS)
-#     exec_program(${CAIRO_CONFIG} ARGS "--cflags cairo" OUTPUT_VARIABLE CAIRO_CFLAGS)
-  endif (CAIRO_INCLUDE_DIR)
-endif (CAIRO_LIBRARY)
+#     exec_program(${cairo_CONFIG} ARGS "--libs cairo" OUTPUT_VARIABLE cairo_LIBS)
+#     exec_program(${cairo_CONFIG} ARGS "--cflags cairo" OUTPUT_VARIABLE cairo_CFLAGS)
+  endif (cairo_INCLUDE_DIR)
+endif (cairo_LIBRARY)

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24350&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Tue Dec 22 22:00:27 2020
@@ -1218,9 +1218,9 @@
 	set(EXE_NAME "scribus${TAG_VERSION}" CACHE STRING "Scribus version")
 endif()
 
-if(COMMAND cmake_policy)
-	cmake_policy(SET CMP0003 OLD)
-endif()
+#if(COMMAND cmake_policy)
+#	cmake_policy(SET CMP0003 OLD)
+#endif()
 
 if(HAVE_OSG)
 	add_executable(${EXE_NAME}




More information about the scribus-commit mailing list