"Fossies" - the Fresh Open Source Software Archive

Member "ssr-0.4.2/CMakeLists.txt" (18 May 2020, 3533 Bytes) of package /linux/privat/ssr-0.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 0.4.1_vs_0.4.2.

    1 cmake_minimum_required(VERSION 3.1)
    2 cmake_policy(VERSION 3.1)
    3 
    4 set(CMAKE_CXX_STANDARD 11)
    5 
    6 project(simplescreenrecorder VERSION 0.4.2)
    7 
    8 if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|i386|i686")
    9 	set(PROCESSOR_IS_X86 TRUE)
   10 else()
   11 	set(PROCESSOR_IS_X86 FALSE)
   12 endif()
   13 
   14 option(ENABLE_32BIT_GLINJECT "Build the 32-bit version of 'libssr-glinject' on 64-bit systems (in addition to the 64-bit version). Required for OpenGL recording of 32-bit applications on 64-bit systems." FALSE)
   15 option(ENABLE_X86_ASM "Allow x86/x64 assembly or intrinsics." ${PROCESSOR_IS_X86})
   16 option(ENABLE_FFMPEG_VERSIONS "Use FFmpeg version numbers for feature support tests. Enable when using FFmpeg, disable when using Libav." TRUE)
   17 option(WITH_OPENGL_RECORDING "Build with OpenGL recording support." TRUE)
   18 option(WITH_ALSA "Build with ALSA support." TRUE)
   19 option(WITH_PULSEAUDIO "Build with PulseAudio support." TRUE)
   20 option(WITH_JACK "Build with JACK support." TRUE)
   21 option(WITH_QT5 "Build with Qt5 (instead of Qt4)." FALSE)
   22 option(WITH_SIMPLESCREENRECORDER "Build the 'simplescreenrecorder' executable." TRUE)
   23 option(WITH_GLINJECT "Build the 'libssr-glinject' library. Required for OpenGL recording." TRUE)
   24 
   25 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
   26 
   27 include(FeatureSummary)
   28 include(GNUInstallDirs)
   29 
   30 # try to guess the correct 32-bit library path on 64-bit systems
   31 if(ENABLE_32BIT_GLINJECT)
   32 
   33 	if(NOT DEFINED CMAKE_INSTALL_LIB32DIR)
   34 		set(_LIB32DIR_DEFAULT "lib32")
   35 		if(EXISTS "/etc/debian_version")
   36 			if(EXISTS "/usr/lib/i386-linux-gnu")
   37 				set(_LIB32DIR_DEFAULT "lib/i386-linux-gnu")
   38 			elseif(EXISTS "/usr/lib/i686-linux-gnu")
   39 				set(_LIB32DIR_DEFAULT "lib/i686-linux-gnu")
   40 			else()
   41 				message(WARNING "Could not find correct multiarch 32-bit library path, falling back to 'lib32'.")
   42 			endif()
   43 		endif()
   44 		set(CMAKE_INSTALL_LIB32DIR "${_LIB32DIR_DEFAULT}" CACHE PATH "object code libraries, 32-bit (${_LIB32DIR_DEFAULT})")
   45 	endif()
   46 	
   47 	mark_as_advanced(CMAKE_INSTALL_LIB32DIR)
   48 
   49 	if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIB32DIR})
   50 		set(CMAKE_INSTALL_FULL_LIB32DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIB32DIR}")
   51 	else()
   52 		set(CMAKE_INSTALL_FULL_LIB32DIR "${CMAKE_INSTALL_LIB32DIR}")
   53 	endif()
   54 
   55 endif()
   56 
   57 if(WITH_GLINJECT)
   58 
   59 	add_subdirectory(glinject)
   60 
   61 endif()
   62 
   63 if(WITH_SIMPLESCREENRECORDER)
   64 
   65 	add_subdirectory(src)
   66 	add_subdirectory(src/translations)
   67 
   68 	if(WITH_OPENGL_RECORDING)
   69 		# the 'ssr-glinject' script is installed together with the main SSR executable to avoid problems with multiarch packages
   70 		install(
   71 			FILES scripts/ssr-glinject
   72 			DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
   73 			PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
   74 		)
   75 	endif()
   76 	install(
   77 		DIRECTORY data/output-profiles
   78 		DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/simplescreenrecorder
   79 	)
   80 	install(
   81 		DIRECTORY data/man/
   82 		DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1
   83 	)
   84 	install(
   85 		FILES data/simplescreenrecorder.desktop
   86 		DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications
   87 	)
   88 	install(
   89 		FILES data/simplescreenrecorder.metainfo.xml
   90 		DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/metainfo
   91 	)
   92 
   93 	# icons
   94 	set(icons_res 16 22 24 32 48 64 96 128 192 256)
   95 
   96 	foreach(res IN LISTS icons_res)
   97 		install(
   98 			DIRECTORY data/icons/${res}/
   99 			DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/${res}x${res}/apps
  100 		)
  101 	endforeach()
  102 
  103 	install(
  104 		DIRECTORY data/icons/scalable/
  105 		DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/apps
  106 	)
  107 
  108 endif()
  109 
  110 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)