Show a little summary of what will and will not be built at the end of cmake
This commit is contained in:
parent
83164053c8
commit
29ec96e7b6
@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(FindPkgConfig)
|
||||
include(cmake/Summary.cmake)
|
||||
include(cmake/Version.cmake)
|
||||
|
||||
find_package(Qt4 REQUIRED QtCore QtGui QtOpenGL QtSql QtNetwork QtXml)
|
||||
@ -116,6 +117,22 @@ if(NOT APPLE AND NOT WIN32)
|
||||
option(ENABLE_WIIMOTEDEV "Enable Wii remote support in Clementine" ON)
|
||||
endif(NOT APPLE AND NOT WIN32)
|
||||
|
||||
if(LIBGPOD_FOUND)
|
||||
set(HAVE_LIBGPOD ON)
|
||||
endif(LIBGPOD_FOUND)
|
||||
|
||||
if(GIO_FOUND)
|
||||
set(HAVE_GIO ON)
|
||||
endif(GIO_FOUND)
|
||||
|
||||
if(IMOBILEDEVICE_FOUND AND PLIST_FOUND AND LIBGPOD_FOUND AND USBMUXD_FOUND)
|
||||
set(HAVE_IMOBILEDEVICE ON)
|
||||
endif(IMOBILEDEVICE_FOUND AND PLIST_FOUND AND LIBGPOD_FOUND AND USBMUXD_FOUND)
|
||||
|
||||
if(LIBMTP_FOUND)
|
||||
set(HAVE_LIBMTP ON)
|
||||
endif(LIBMTP_FOUND)
|
||||
|
||||
if(ENABLE_VISUALISATIONS)
|
||||
# When/if upstream accepts our patches then these options can be used to link
|
||||
# to system installed projectM instead.
|
||||
@ -211,3 +228,12 @@ configure_file(
|
||||
|
||||
add_custom_target(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
# Show a summary of what we have enabled
|
||||
summary_add("devices: iPod classic support" HAVE_LIBGPOD)
|
||||
summary_add("devices: iPod Touch, iPhone, iPad support" HAVE_IMOBILEDEVICE)
|
||||
summary_add("devices: MTP support" LIBMTP_FOUND)
|
||||
summary_add("devices: GIO backend" HAVE_GIO)
|
||||
summary_add("Wiimote support" ENABLE_WIIMOTEDEV)
|
||||
summary_add("Visualisations" ENABLE_VISUALISATIONS)
|
||||
summary_show()
|
||||
|
@ -66,10 +66,6 @@ macro(print_engines)
|
||||
pig()
|
||||
message("")
|
||||
endif(ENGINES_UNSUPPORTED)
|
||||
|
||||
message(STATUS "Building engines:${ENGINES_ENABLED}")
|
||||
message(STATUS "Skipping engines:${ENGINES_DISABLED}")
|
||||
|
||||
# need at least 1 engine
|
||||
if(NOT ENGINES_ENABLED)
|
||||
message(FATAL_ERROR "no engine enabled!")
|
||||
|
27
cmake/Summary.cmake
Normal file
27
cmake/Summary.cmake
Normal file
@ -0,0 +1,27 @@
|
||||
set(summary_willbuild "")
|
||||
set(summary_willnotbuild "")
|
||||
|
||||
macro(summary_add name test)
|
||||
if (${test})
|
||||
list(APPEND summary_willbuild ${name})
|
||||
else (${test})
|
||||
list(APPEND summary_willnotbuild "${name}")
|
||||
endif (${test})
|
||||
endmacro(summary_add)
|
||||
|
||||
macro(summary_show_part variable title)
|
||||
list(LENGTH ${variable} _len)
|
||||
if (_len)
|
||||
message("")
|
||||
message(${title})
|
||||
foreach (_item ${${variable}})
|
||||
message(" ${_item}")
|
||||
endforeach (_item)
|
||||
endif (_len)
|
||||
endmacro(summary_show_part)
|
||||
|
||||
macro(summary_show)
|
||||
summary_show_part(summary_willbuild "The following components will be built:")
|
||||
summary_show_part(summary_willnotbuild "The following components WILL NOT be built:")
|
||||
message("")
|
||||
endmacro(summary_show)
|
@ -498,7 +498,6 @@ if(NOT APPLE AND NOT WIN32)
|
||||
|
||||
list(APPEND SOURCES ui/wiimotedevshortcutsconfig.cpp)
|
||||
list(APPEND HEADERS ui/wiimotedevshortcutsconfig.h)
|
||||
|
||||
endif(ENABLE_WIIMOTEDEV)
|
||||
|
||||
# DeviceKit lister source
|
||||
@ -507,26 +506,23 @@ if(NOT APPLE AND NOT WIN32)
|
||||
endif(NOT APPLE AND NOT WIN32)
|
||||
|
||||
# Libgpod device backend
|
||||
if(LIBGPOD_FOUND)
|
||||
set(HAVE_LIBGPOD ON)
|
||||
if(HAVE_LIBGPOD)
|
||||
include_directories(${LIBGPOD_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND SOURCES devices/gpoddevice.cpp devices/gpodloader.cpp)
|
||||
list(APPEND HEADERS devices/gpoddevice.h devices/gpodloader.h)
|
||||
endif(LIBGPOD_FOUND)
|
||||
endif(HAVE_LIBGPOD)
|
||||
|
||||
# GIO device backend
|
||||
if(GIO_FOUND)
|
||||
set(HAVE_GIO ON)
|
||||
if(HAVE_GIO)
|
||||
include_directories(${GIO_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND SOURCES devices/giolister.cpp)
|
||||
list(APPEND HEADERS devices/giolister.h)
|
||||
endif(GIO_FOUND)
|
||||
endif(HAVE_GIO)
|
||||
|
||||
# libimobiledevice backend and device
|
||||
if(IMOBILEDEVICE_FOUND AND PLIST_FOUND)
|
||||
set(HAVE_IMOBILEDEVICE ON)
|
||||
if(HAVE_IMOBILEDEVICE)
|
||||
include_directories(${IMOBILEDEVICE_INCLUDE_DIRS})
|
||||
include_directories(${PLIST_INCLUDE_DIRS})
|
||||
include_directories(${PLISTPP_INCLUDE_DIRS})
|
||||
@ -541,11 +537,10 @@ if(IMOBILEDEVICE_FOUND AND PLIST_FOUND)
|
||||
list(APPEND HEADERS devices/afcfile.h)
|
||||
list(APPEND HEADERS devices/afctransfer.h)
|
||||
list(APPEND HEADERS devices/ilister.h)
|
||||
endif(IMOBILEDEVICE_FOUND AND PLIST_FOUND)
|
||||
endif(HAVE_IMOBILEDEVICE)
|
||||
|
||||
# mtp device
|
||||
if(LIBMTP_FOUND)
|
||||
set(HAVE_LIBMTP ON)
|
||||
if(HAVE_LIBMTP)
|
||||
include_directories(${LIBMTP_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND SOURCES devices/mtpconnection.cpp)
|
||||
@ -555,7 +550,7 @@ if(LIBMTP_FOUND)
|
||||
list(APPEND SOURCES devices/mtpconnection.h)
|
||||
list(APPEND HEADERS devices/mtpdevice.h)
|
||||
list(APPEND HEADERS devices/mtploader.h)
|
||||
endif(LIBMTP_FOUND)
|
||||
endif(HAVE_LIBMTP)
|
||||
|
||||
# Windows media lister
|
||||
IF(WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user