trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2011

trinity-kdebase [ 81%] Built

From: Castro <castro@...>
Date: Sun, 27 Mar 2011 17:00:02 +0100
Hi Serghei,

I am learning something about Cmake. :-)

I've added few files to your cmake modules.

FindXcomposite.cmake
FindXFixes.cmake
FindXrender.cmake
FindXdamage.cmake
FindXinerama.cmake



This one should be simple but I have run out of steam. :-(

Started work at 2am, it is 5pm!
Time for a pint or two. :-)

[ 81%] Built target ksplashredmond-module
Linking CXX executable ksplashsimple
/usr/bin/ld: cannot find -ltqt
/usr/bin/ld: cannot find -lqt-mt
collect2: ld returned 1 exit status
make[2]: *** [ksplashml/themeengine/simple/ksplashsimple] Error 1
make[1]: *** 
[ksplashml/themeengine/simple/CMakeFiles/ksplashsimple.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
[castro@castro2 trinity-kdebase]$

Castro.

# Try to find Xcomposite
# XCOMPOSITE_FOUND - If false, do not try to use Xcomposite
# XCOMPOSITE_LIBRARIES - the libraries to link against
# XCOMPOSITE_DEFINITIONS - switches required for Xcomposite
	
	
if (XCOMPOSITE_LIBRARIES)
	# path set by user or was found in the past
	set(XCOMPOSITE_FOUND TRUE)
		else (XCOMPOSITE_LIBRARIES)
		find_package(PkgConfig)
		
		pkg_search_module(XCOMPOSITE xcomposite)
endif (XCOMPOSITE_LIBRARIES)
 
# Try to find Xdamage
# XDAMAGE_FOUND - If false, do not try to use Xdamage
# XDAMAGE_LIBRARIES - the libraries to link against
# XDAMAGE_DEFINITIONS - switches required for Xdamage


if (XDAMAGE_LIBRARIES)
	# path set by user or was found in the past
	set(XDAMAGE_FOUND TRUE)
		else (XDAMAGE_LIBRARIES)
		set(XDAMAGE_DEFINITIONS "")

		find_library(XDAMAGE_LIBRARIES
		NAMES Xdamage
		PATHS
		)

		if (XDAMAGE_LIBRARIES)
		set(XDAMAGE_FOUND TRUE)
		endif (XDAMAGE_LIBRARIES)
		
		if (XDAMAGE_FOUND)
		if (NOT XDAMAGE_FIND_QUIETLY)
		message(STATUS "Found Xdamage: ${XDAMAGE_LIBRARIES}")
		endif (NOT XDAMAGE_FIND_QUIETLY)
		else (XDAMAGE_FOUND)
		if (XDAMAGE_FIND_REQUIRED)
		message(FATAL_ERROR "Could not find Xdamage")
		endif (XDAMAGE_FIND_REQUIRED)
		endif (XDAMAGE_FOUND)
		
		# set visibility in cache
		set(XDAMAGE_DEFINITIONS ${XDAMAGE_DEFINITIONS} CACHE STRING "Defines for compilation." FORCE)
		mark_as_advanced(XDAMAGE_LIBRARIES XDAMAGE_DEFINITIONS)
		
endif (XDAMAGE_LIBRARIES)


# Try to find Xinput
# XINPUT_FOUND - If false, do not try to use Xrender
# XINPUT_LIBRARIES - the libraries to link against
# XINPUT_DEFINITIONS - switches required for Xrender

#X11_Xext_LIB

if (XEXT_LIBRARIES)
	# path set by user or was found in the past
	set(XEXT_FOUND TRUE)
else (XEXT_LIBRARIES)
	find_package(PkgConfig)

	pkg_search_module(XEXT xext)
endif (XEXT_LIBRARIES)
 
# - Find XFixes
# Find the XFixes library
#
# This module defines
# XFIXES_FOUND - whether the XFixes library was found
# XFIXES_LIBRARIES - the library
# XFIXES_INCLUDE_DIR - the include path of the library
#


find_package(PkgConfig)
if(NOT PKG_CONFIG_FOUND)
		message(STATUS "Could not find pkg-config (pkg name: pkg-config)")

		# lib suffix
		if(CMAKE_SIZEOF_VOID_P EQUAL 4)
			SET(LIB_SUFFIX "")
		else(CMAKE_SIZEOF_VOID_P EQUAL 4)
			SET(LIB_SUFFIX 64)
		endif()

		# libraries
		find_library (XFIXES_LIBRARIES NAMES Xfixes PATHS ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
		# include
		find_path (XFIXES_INCLUDE_DIR NAMES X11/extensions/Xfixes.h PATHS ${INCLUDE_INSTALL_DIR})
		include(FindPackageHandleStandardArgs)
		find_package_handle_standard_args(XFixes DEFAULT_MSG XFIXES_LIBRARIES XFIXES_INCLUDE_DIR)
		mark_as_advanced(XFIXES_INCLUDE_DIR XFIXES_LIBRARIES)
	else()
		pkg_search_module(XFIXES xfixes)
endif(NOT PKG_CONFIG_FOUND)
# Try to find Xinerama
# XINERAMA_FOUND - If false, do not try to use Xinerama
# XINERAMA_LIBRARIES - the libraries to link against
# XINERAMA_DEFINITIONS - switches required for Xinerama


if (XINERAMA_LIBRARIES)
# path set by user or was found in the past
set(XINERAMA_FOUND TRUE)
else (XINERAMA_LIBRARIES)
find_package(PkgConfig)

pkg_search_module(XINERAMA Xinerama)
endif (XINERAMA_LIBRARIES)