From 326eaa5b7825f3e023234a888912ffd21e1099dd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Jul 09 2016 00:44:05 +0000 Subject: CMake: use STATUS for messages, spaces indentation --- diff --git a/toonz/cmake/util_compiler.cmake b/toonz/cmake/util_compiler.cmake index 7db1913..42e92b1 100644 --- a/toonz/cmake/util_compiler.cmake +++ b/toonz/cmake/util_compiler.cmake @@ -2,32 +2,32 @@ include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) function(ADD_CHECK_C_COMPILER_FLAG - _CFLAGS - _CACHE_VAR - _FLAG - ) + _CFLAGS + _CACHE_VAR + _FLAG + ) - CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") - if(${_CACHE_VAR}) - # message(STATUS "Using CFLAG: ${_FLAG}") - set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}" PARENT_SCOPE) - else() - message(STATUS "Unsupported CFLAG: ${_FLAG}") - endif() + CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") + if(${_CACHE_VAR}) + # message(STATUS "Using CFLAG: ${_FLAG}") + set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}" PARENT_SCOPE) + else() + message(STATUS "Unsupported CFLAG: ${_FLAG}") + endif() endfunction() function(ADD_CHECK_CXX_COMPILER_FLAG - _CXXFLAGS - _CACHE_VAR - _FLAG - ) + _CXXFLAGS + _CACHE_VAR + _FLAG + ) - CHECK_CXX_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") - if(${_CACHE_VAR}) - # message(STATUS "Using CXXFLAG: ${_FLAG}") - set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}" PARENT_SCOPE) - else() - message(STATUS "Unsupported CXXFLAG: ${_FLAG}") - endif() + CHECK_CXX_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") + if(${_CACHE_VAR}) + # message(STATUS "Using CXXFLAG: ${_FLAG}") + set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}" PARENT_SCOPE) + else() + message(STATUS "Unsupported CXXFLAG: ${_FLAG}") + endif() endfunction() diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index ab66296..9b32966 100644 --- a/toonz/sources/CMakeLists.txt +++ b/toonz/sources/CMakeLists.txt @@ -4,7 +4,7 @@ project(OpenToonz) include(${CMAKE_SOURCE_DIR}/../cmake/util_compiler.cmake) get_filename_component(SDKROOT ../../thirdparty/ ABSOLUTE) -message("SDK Root:" ${SDKROOT}) +message(STATUS "SDK Root:" ${SDKROOT}) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake") if(APPLE) set(THIRDPARTY_LIBS_HINTS "/usr/local/Cellar/" "/opt/include" ${SDKROOT}) @@ -12,10 +12,11 @@ elseif(WIN32 OR UNIX) set(THIRDPARTY_LIBS_HINTS ${SDKROOT}) endif() -message("Thirdpary Library Search path:" ${THIRDPARTY_LIBS_HINTS}) +message(STATUS "Thirdpary Library Search path:" ${THIRDPARTY_LIBS_HINTS}) if(WIN32) - message("Windows System") + message(STATUS "Windows System") + if(MSVC_VERSION GREATER 1800) if(CMAKE_SIZEOF_VOID_P EQUAL 4) set(QT_PATH "C:/Qt/5.6/msvc2015" CACHE PATH "Qt instlattion directory") @@ -43,7 +44,8 @@ if(WIN32) -D_USE_MATH_DEFINES ) elseif(APPLE) - message("Apple System") + message(STATUS "Apple System") + if(NOT PLATFORM) set(PLATFORM 64) endif() @@ -77,10 +79,11 @@ elseif(APPLE) message(FATAL_ERROR "Invalid PLATFORM:" ${PLATFORM} ". 'PLATFORM' must be 32 or 64.") endif() elseif(UNIX) + message(STATUS "Unix System") + # Needed for correct Qt detection cmake_minimum_required(VERSION 2.8.12) - message("Unix System") if(CMAKE_SIZEOF_VOID_P MATCHES "8") set(PLATFORM 64) else() @@ -155,7 +158,7 @@ endif() get_target_property(QtCore_location Qt5::Core LOCATION) get_target_property(QtWidget_location Qt5::Widgets LOCATION) -message("Qt Core Location:" ${QtCore_location}) +message(STATUS "Qt Core Location:" ${QtCore_location}) macro(_find_toonz_library OUT_LIB_LIST IN_LIB_LIST) set(OUTLIST "") diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txt index f112a16..9dda69e 100644 --- a/toonz/sources/toonz/CMakeLists.txt +++ b/toonz/sources/toonz/CMakeLists.txt @@ -138,7 +138,7 @@ set(MOC_HEADERS comboviewerpane.h historypane.h cleanupsettingspane.h - penciltestpopup.h + penciltestpopup.h # Tracker file dummyprocessor.h metnum.h @@ -295,7 +295,7 @@ set(SOURCES comboviewerpane.cpp historypane.cpp cleanupsettingspane.cpp - penciltestpopup.cpp + penciltestpopup.cpp # Tracker file dummyprocessor.cpp metnum.cpp