-CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.8.2)
CMAKE_POLICY(SET CMP0012 NEW) # Prevent dereferencing of OFF/ON as variables
-SET(name "dali-core")
+SET(name "dali2-core")
+SET(CMAKE_C_STANDARD 99)
+SET(CMAKE_CXX_STANDARD 17)
PROJECT(${name})
SET(PKG_NAME ${name})
ENDIF()
# API VERSION (Not DALi release version)
-SET(${name}_VERSION_MAJOR 0)
+SET(${name}_VERSION_MAJOR 2)
SET(${name}_VERSION_MINOR 0)
SET(${name}_VERSION_PATCH 0)
SET(${name}_VERSION ${${name}_VERSION_MAJOR}.${${name}_VERSION_MINOR}.${${name}_VERSION_PATCH})
# Requires the following variables to be setup:
# @PREFIX@ @EXEC_PREFIX@ @DALI_VERSION@ @LIB_DIR@ @DEV_INCLUDE_PATH@
SET( DEV_INCLUDE_PATH ${INCLUDE_DIR} )
- SET( CORE_PKG_CFG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/dali-core.pc )
+ SET( CORE_PKG_CFG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/dali2-core.pc )
CONFIGURE_FILE( ${CORE_PKG_CFG_FILE}.in ${CORE_PKG_CFG_FILE} @ONLY )
ENDIF()
ELSEIF( UNIX )
+ INCLUDE(CheckCXXCompilerFlag)
+
# Set up compiler flags and warnings
- ADD_COMPILE_OPTIONS( -std=c++11 )
ADD_COMPILE_OPTIONS( -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast )
# TODO: Clang is a lot more strict with warnings, we should address
# those issues at some point.
- IF( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" )
+ IF( NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" )
ADD_COMPILE_OPTIONS( -Werror )
ENDIF()
- ADD_COMPILE_OPTIONS( -Wall -Wextra -Wno-unused-parameter -Wfloat-equal -Wno-class-memaccess -Wno-cast-function-type )
+ ADD_COMPILE_OPTIONS( -Wall -Wextra -Wno-unused-parameter -Wfloat-equal )
+ CHECK_CXX_COMPILER_FLAG(-Wno-class-memaccess HAVE_NO_CLASS_MEMACCESS)
+ IF (HAVE_NO_CLASS_MEMACCESS)
+ ADD_COMPILE_OPTIONS( -Wno-class-memaccess )
+ ENDIF()
+
+ CHECK_CXX_COMPILER_FLAG(-Wno-cast-function-type HAVE_NO_CAST_FUNCTION_TYPE)
+ IF (HAVE_NO_CAST_FUNCTION_TYPE)
+ ADD_COMPILE_OPTIONS( -Wno-cast-function-type )
+ ENDIF()
+ CHECK_CXX_COMPILER_FLAG(-Wno-string-plus-int HAVE_NO_STRING_PLUS_INT)
+ IF (HAVE_NO_STRING_PLUS_INT)
+ ADD_COMPILE_OPTIONS( -Wno-string-plus-int )
+ ENDIF()
IF( ENABLE_COVERAGE OR "$ENV{CXXFLAGS}" MATCHES --coverage )
ADD_COMPILE_OPTIONS( --coverage )
SET(ENABLE_COVERAGE ON)
INCLUDE( ${ROOT_SRC_DIR}/dali/integration-api/file.list )
INCLUDE( ${ROOT_SRC_DIR}/dali/public-api/file.list )
INCLUDE( ${ROOT_SRC_DIR}/dali/devel-api/file.list )
+INCLUDE( ${ROOT_SRC_DIR}/dali/graphics-api/file.list )
IF( WIN32 )
INCLUDE( ${ROOT_SRC_DIR}/dali/internal/file-windows.list )
ELSEIF( UNIX )
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake DESTINATION share/${name} )
# Install the pdb file.
- IF( ENABLE_DEBUG )
+ IF( ENABLE_DEBUG AND WIN32 )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/${name}.pdb DESTINATION ${BIN_DIR} )
ENDIF()
ELSE()
# Install headers using lists defined by ADD_SUBDIRECTORY
INSTALL_HEADERS_WITH_DIRECTORY(PUBLIC_API_HEADERS ${ROOT_SRC_DIR}/dali "dali")
INSTALL_HEADERS_WITH_DIRECTORY(DEVEL_API_HEADERS ${ROOT_SRC_DIR}/dali "dali")
+INSTALL_HEADERS_WITH_DIRECTORY(GRAPHICS_API_HEADERS ${ROOT_SRC_DIR}/dali "dali")
INSTALL_HEADERS_WITH_DIRECTORY(INTEGRATION_API_HEADERS ${ROOT_SRC_DIR}/dali "dali")
INSTALL_HEADERS_WITH_DIRECTORY(PACKAGE_DOXY_HEADERS ${PACKAGE_DOXY_SRC_DIR} "dali/doc" )
-name libdali*.so* \)
| grep -v TC | xargs rm -rf
TARGET ${DALI_CORE_PREFIX}distclean
- VERBATIM
+VERBATIM
)
ENDIF( LCOV_BIN )
SET( LINKER_TEST_SOURCES
linker-test.cpp
${DALI_TEST_SUITE_DIR}/test-application.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-controller.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-sampler.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-texture.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-buffer.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-pipeline.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-program.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-shader.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-reflection.cpp
+ ${DALI_TEST_SUITE_DIR}/test-graphics-command-buffer.cpp
${DALI_TEST_SUITE_DIR}/test-platform-abstraction.cpp
${DALI_TEST_SUITE_DIR}/test-render-controller.cpp
${DALI_TEST_SUITE_DIR}/test-gl-abstraction.cpp