User

Difference between revisions of "Sascha"

From Guiliani

 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
streamruntime:
+
<!--
  
 +
https://developers.google.com/speed/webp/docs/riff_container
 +
https://chromium.googlesource.com/webm/libvpx
  
#
+
vera++ -> checkstlye output -> warnings next generation (input as logfile)
# This is the CMakeLists.txt file for the StreamRuntime application
 
#
 
  
# ========== Minimum cmake version required ==========
+
google code stylguide
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
+
https://google.github.io/styleguide/cppguide.html
  
SET(PATH_COMMON "${CMAKE_CURRENT_SOURCE_DIR}/../CMake" CACHE PATH "CMake common files directory path")
+
google styleguide cpplint
 +
https://github.com/google/styleguide
  
SET(STREAMRUNTIME_APPNAME "StreamRuntime")
+
find bugs plugin -> warnings next generation
  
# sets into parent_scope if any (gets rid of additional variable for appname)
+
tags (e.g. TODO, FIXME, ...) can be found and listed
get_directory_property(hasParent PARENT_DIRECTORY)
 
IF(hasParent)
 
  SET(STREAMRUNTIME_APPNAME ${STREAMRUNTIME_APPNAME} PARENT_SCOPE)
 
ENDIF(hasParent)
 
  
# ========== Set project name and version number ==========
+
-->
PROJECT(${STREAMRUNTIME_APPNAME}
 
VERSION "3.0.0")
 
 
 
# ========== Setup configurations ==========
 
INCLUDE("${PATH_COMMON}/Common_settings.cmake")
 
# Configuration for SDK Package
 
IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackPackages.cmake")
 
  # Only add SDK settings if cmake sdk packages file exists
 
  SET(SDK_PACKAGE_GENERATOR CACHE BOOL "Generate Guiliani SDK Install Packages")
 
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackPackages.cmake")
 
 
 
SET(STREAMRUNTIME_SDK_PROJECT 1 CACHE BOOL "Generate SDK project? (Activate this if you are using Guiliani as a library)")
 
 
 
IF(GSE_SDK_PROJECT)
 
  SET(STREAMRUNTIME_SDK_PROJECT 1 CACHE BOOL "Generate SDK project? (Activate this if you are using Guiliani as a library)" FORCE)
 
ENDIF(GSE_SDK_PROJECT)
 
 
 
IF(STREAMRUNTIME_SDK_PROJECT)
 
  SET(GSE_PROJECT 1)  #means do not include Guiliani and eGaC project!
 
ENDIF(STREAMRUNTIME_SDK_PROJECT)
 
 
 
IF(NOT STREAMRUNTIME_SDK_PROJECT)
 
  IF(CMAKE_CONFIGURATION_TYPES)
 
    LIST(APPEND CMAKE_CONFIGURATION_TYPES DebugFixpoint ReleaseFixpoint)
 
    LIST(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
 
    SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Reset the configurations to what we need" FORCE)
 
  ENDIF(CMAKE_CONFIGURATION_TYPES)
 
ENDIF(NOT STREAMRUNTIME_SDK_PROJECT)
 
 
 
# ========== Include correct platform file ==========
 
INCLUDE("${PATH_COMMON}/Platform.cmake")
 
 
 
# ========== Output some information ==========
 
INCLUDE("${PATH_COMMON}/Build_information.cmake")
 
 
 
# ========== Set application specific includes ==========
 
INCLUDE_DIRECTORIES(BEFORE
 
  "${PROJECT_SOURCE_DIR}/Include"
 
  "${PROJECT_SOURCE_DIR}/Include/GUIConfig"
 
  "${PROJECT_SOURCE_DIR}/Include/CustomExtension"
 
  "${PROJECT_SOURCE_DIR}/Include/GUIConfigCustom"
 
  "${PROJECT_SOURCE_DIR}/Common/Include"
 
)
 
 
 
IF(NOT STREAMRUNTIME_SDK_PROJECT)
 
  # ========== Set include directories ==========
 
  INCLUDE("${PATH_COMMON}/Include_directories.cmake")
 
 
 
  SET(GSE_GUICONFIG_CPP "${PATH_GUILIANI}/Share/GUIConfig.cpp")
 
ELSE(NOT STREAMRUNTIME_SDK_PROJECT)
 
  INCLUDE_DIRECTORIES(
 
    "${PROJECT_SOURCE_DIR}/../eGaC/Include/eC"
 
    "${PROJECT_SOURCE_DIR}/../eGaC/Include/eGML"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Core"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/GUIConfig"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/ImageDecoder"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Platform/eGML"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Platform/general"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Platform/GL"
 
  )
 
 
 
  SET(GSE_GUICONFIG_CPP "${PROJECT_SOURCE_DIR}/../GSE/Share/GUIConfig.cpp")
 
ENDIF(NOT STREAMRUNTIME_SDK_PROJECT)
 
 
 
# ========== StreamRuntime Source files ==========
 
FILE(GLOB SR_SOURCE_CPP
 
    "${PROJECT_SOURCE_DIR}/Source/*.cpp"
 
    "${PROJECT_SOURCE_DIR}/Common/Source/*.cpp")
 
SOURCE_GROUP("Source Files" FILES ${SR_SOURCE_CPP})
 
 
 
FILE(GLOB SR_SOURCE_H
 
    "${PROJECT_SOURCE_DIR}/Include/*.h"
 
    "${PROJECT_SOURCE_DIR}/Common/Include/*.h")
 
SOURCE_GROUP("Header Files" FILES ${SR_SOURCE_H})
 
 
 
FILE(GLOB SR_GUICONFIG_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/GUIConfig/*.h")
 
SOURCE_GROUP("Header Files\\GUIConfig" FILES ${SR_GUICONFIG_SOURCE_H})
 
 
 
# ========== GSE Source files ==========
 
SOURCE_GROUP("GUIConfig" FILES ${GSE_GUICONFIG_CPP})
 
 
 
FILE(GLOB GSE_CUSTOM_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/CustomExtension/*.cpp")
 
SOURCE_GROUP("Source Files\\Custom Extension" FILES ${GSE_CUSTOM_SOURCE_CPP})
 
 
 
FILE(GLOB GSE_CUSTOM_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/CustomExtension/*.h")
 
SOURCE_GROUP("Header Files\\Custom Extension" FILES ${GSE_CUSTOM_SOURCE_H})
 
 
 
FILE(GLOB GSE_CUSTOM_GUICONFIG_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/GUIConfigCustom/*.h")
 
SOURCE_GROUP("Header Files\\Custom Resource IDs" FILES ${GSE_CUSTOM_GUICONFIG_SOURCE_H})
 
 
# ========== Create complete list of files for GSE binary ==========
 
SET(SR_SOURCES_LIST
 
  ${SR_SOURCE_CPP}
 
  ${SR_SOURCE_H}
 
  ${SR_GUICONFIG_SOURCE_H}
 
  ${GSE_GUICONFIG_CPP}
 
  ${GSE_CUSTOM_SOURCE_CPP}
 
  ${GSE_CUSTOM_SOURCE_H}
 
  ${GSE_CUSTOM_GUICONFIG_SOURCE_H}
 
  ${PLATFORM_FILES}
 
)
 
 
 
# ========== Build StreamRuntime binary ==========
 
# Don't build StreamRuntime as MACOSX_BUNDLE.
 
IF(GSE_MAKE_BUNDLE)
 
  LIST(REMOVE_ITEM ADD_EXECUTABLE_PARAMETERS MACOSX_BUNDLE)
 
ENDIF(GSE_MAKE_BUNDLE)
 
ADD_EXECUTABLE(${PROJECT_NAME} ${ADD_EXECUTABLE_PARAMETERS} ${SR_SOURCES_LIST})
 
 
 
IF(NOT GSE_PROJECT)
 
  # ========== Add eGaC ==========
 
  IF(EXISTS "${PATH_EGAC}/CMakeLists.txt")
 
      ADD_SUBDIRECTORY("${PATH_EGAC}" ./eGaC)
 
  ELSE(EXISTS "${PATH_EGAC}/CMakeLists.txt")
 
      MESSAGE(FATAL_ERROR "Path not set or wrong to eGaC directory.")
 
  ENDIF(EXISTS "${PATH_EGAC}/CMakeLists.txt")
 
 
 
  # ========== Add Guiliani ==========
 
  IF(EXISTS "${PATH_GUILIANI}/CMakeLists.txt")
 
      ADD_SUBDIRECTORY("${PATH_GUILIANI}" ./Guiliani)
 
  ELSE(EXISTS "${PATH_GUILIANI}/CMakeLists.txt")
 
      MESSAGE(FATAL_ERROR "Path not set or wrong to Guiliani directory.")
 
  ENDIF(EXISTS "${PATH_GUILIANI}/CMakeLists.txt")
 
ENDIF(NOT GSE_PROJECT)
 
 
 
 
 
 
 
# ========== Link the executable to the needed libraries ==========
 
TARGET_LINK_LIBRARIES(${PROJECT_NAME}
 
  Guiliani
 
  eGaC
 
  ${PLATFORM_LIBS}
 
)
 
 
 
# ========== Set output directories ==========
 
IF(MSVC_IDE)
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_SOURCE_DIR}/bin/win/pc")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_SOURCE_DIR}/bin/win/pc")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGFIXPOINT "${PROJECT_SOURCE_DIR}/bin/win/pc")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEFIXPOINT "${PROJECT_SOURCE_DIR}/bin/win/pc")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGEVALUATION "${PROJECT_SOURCE_DIR}/bin/win/pc")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEEVALUATION "${PROJECT_SOURCE_DIR}/bin/win/pc")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_NAME "${PROJECT_NAME}")
 
ENDIF(MSVC_IDE)
 
 
 
IF(APPLE AND NOT CMAKE_PLATFORM_NAME STREQUAL "iphonesimulator" AND NOT CMAKE_PLATFORM_NAME STREQUAL "iphoneos")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_SOURCE_DIR}/bin/OSX")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_SOURCE_DIR}/bin/OSX")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGFIXPOINT "${PROJECT_SOURCE_DIR}/bin/OSX")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEFIXPOINT "${PROJECT_SOURCE_DIR}/bin/OSX")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGEVALUATION "${PROJECT_SOURCE_DIR}/bin/OSX")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEEVALUATION "${PROJECT_SOURCE_DIR}/bin/OSX")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_NAME "${PROJECT_NAME}")
 
ENDIF(APPLE AND NOT CMAKE_PLATFORM_NAME STREQUAL "iphonesimulator" AND NOT CMAKE_PLATFORM_NAME STREQUAL "iphoneos")
 
 
 
# ========== Set preprocessor defines ==========
 
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS "${PREPROCESSOR_DEFINES};STREAMRUNTIME_APPLICATION")
 
 
 
IF(NOT GSE_PROJECT)
 
  SET_TARGET_PROPERTIES(Guiliani PROPERTIES COMPILE_DEFINITIONS_DEBUGEVALUATION "GUILIANI_EVALUATION")
 
  SET_TARGET_PROPERTIES(Guiliani PROPERTIES COMPILE_DEFINITIONS_RELEASEEVALUATION "GUILIANI_EVALUATION")
 
  IF(WIN32)
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_DEBUGEVALUATION "eGML_EVALLIB")
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_RELEASEEVALUATION "eGML_EVALLIB")
 
  ELSE(WIN32)
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_DEBUGEVALUATION "eGML_EVALLIB2")
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_RELEASEEVALUATION "eGML_EVALLIB2")
 
  ENDIF(WIN32)
 
ENDIF(NOT GSE_PROJECT)
 
 
 
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUGFIXPOINT "eC_FIXPOINT")
 
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELEASEFIXPOINT "eC_FIXPOINT")
 
 
 
# ========== Add resource files to bundle ==========
 
 
 
IF(APPLE)
 
  # Include common Apple bundle settings
 
  INCLUDE("${PATH_COMMON}/Common_Apple_settings.cmake")
 
 
 
  IF(CMAKE_PLATFORM_NAME STREQUAL "iphonesimulator" OR CMAKE_PLATFORM_NAME STREQUAL "iphoneos")
 
 
 
    # Variable to the resources directory
 
    SET(STREAMRUNTIME_RESOURCES_DIR "${PROJECT_SOURCE_DIR}/../GSE/Examples/EditorDemo/480x640/temp" CACHE PATH "Path to the GUIResources directory which shall be copied into the bundle.")
 
    IF(NOT IS_DIRECTORY ${STREAMRUNTIME_RESOURCES_DIR})
 
      MESSAGE(SEND_ERROR "Please choose an existing resource directory! Set STREAMRUNTIME_RESOURCES_DIR properly.")
 
    ENDIF(NOT IS_DIRECTORY ${STREAMRUNTIME_RESOURCES_DIR})
 
   
 
    # Code signing
 
    SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
 
   
 
    # - Copy the resources into the bundle.
 
    ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME}
 
      POST_BUILD
 
      COMMAND rm -rf ${APPLICATION_NAME}/GUIResources
 
      COMMAND mkdir ${APPLICATION_NAME}/GUIResources
 
      COMMAND cp -r ${STREAMRUNTIME_RESOURCES_DIR}/* ${APPLICATION_NAME}/GUIResources/
 
    )
 
     
 
  ENDIF(CMAKE_PLATFORM_NAME STREQUAL "iphonesimulator" OR CMAKE_PLATFORM_NAME STREQUAL "iphoneos")
 
ENDIF(APPLE)
 
 
 
# ========== Post-Build step: Create bin file  ==========
 
IF("${CMAKE_PLATFORM_NAME}" STREQUAL "rsk_rza1_FreeRTOS")
 
  add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
 
  COMMAND "${CMAKE_OBJCOPY}" -O binary $<TARGET_FILE:GuilianiDemo> $<TARGET_FILE_DIR:GuilianiDemo>/GuilianiDemo.bin
 
  )
 
ENDIF("${CMAKE_PLATFORM_NAME}" STREQUAL "rsk_rza1_FreeRTOS")
 
 
 
IF("${CMAKE_PLATFORM_NAME}" STREQUAL "rza1_mbed")
 
  add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
 
  COMMAND "${CMAKE_OBJCOPY}" -O binary $<TARGET_FILE:GuilianiDemo> $<TARGET_FILE_DIR:GuilianiDemo>/GuilianiDemo.bin
 
  )
 
ENDIF("${CMAKE_PLATFORM_NAME}" STREQUAL "rza1_mbed")
 
IF(SDK_PACKAGE_GENERATOR AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackPackages.cmake")
 
  INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CPackPackages.cmake)
 
ENDIF(SDK_PACKAGE_GENERATOR AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackPackages.cmake")
 
 
 
gse:
 
 
 
 
 
#
 
# This is the CMakeLists.txt file for the GSE
 
#
 
 
 
# ========== Set project name and version number ==========
 
PROJECT(GSE
 
        VERSION "2.2.0")
 
 
 
# ========== Minimum cmake version required ==========
 
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
 
 
 
SET(CMAKE_CXX_STANDARD 11)
 
 
 
SET(PATH_COMMON "${CMAKE_CURRENT_SOURCE_DIR}/../CMake" CACHE PATH "CMake common files directory path")
 
 
 
# ========== Setup configurations ==========
 
INCLUDE("${PATH_COMMON}/Common_settings.cmake")
 
 
 
# Configuration for SDK Installer
 
IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackConfiguration.cmake")
 
  # Only add SDK settings if cmake installer files exists
 
  SET(SDK_PACKAGE_GENERATOR CACHE BOOL "Generate Guiliani SDK Install Packages")
 
ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackConfiguration.cmake")
 
  MESSAGE(STATUS "GSE SDK Project.")
 
  SET(GSE_SDK_PROJECT 1) # Variable for activating SKD build
 
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackConfiguration.cmake")
 
 
 
#Activate OGL per default
 
SET(FORCE_ADD_OGL_PLATFORM 1)
 
 
 
#Activate RTTI
 
SET(FORCE_USE_RTTI 1)
 
 
 
# ========== Include correct platform file ==========
 
INCLUDE("${PATH_COMMON}/Platform.cmake")
 
 
 
# ========== Output some information ==========
 
INCLUDE("${PATH_COMMON}/Build_information.cmake")
 
 
 
# StreamRuntime root path to find the custom extension
 
SET(GSE_ROOT_PATH_STREAMRUNTIME "${PROJECT_SOURCE_DIR}/../StreamRuntime" CACHE PATH "StreamRuntime root path")
 
SET(GSE_ROOT_PATH_RESOURCECOMPILER "${PROJECT_SOURCE_DIR}/GUIResourceCompiler" CACHE PATH "ResourceCompiler root path")
 
 
 
IF(SDK_PACKAGE_GENERATOR OR GSE_SDK_PROJECT)
 
  IF(APPLE)
 
    SET(PATH_GSE "../Resources" CACHE PATH
 
      "This path has to point to the GSE root directory."
 
      FORCE
 
    )
 
  ELSE(APPLE)
 
    SET(PATH_GSE "" CACHE PATH
 
      "This path has to point to the GSE root directory. This path is set empty, so the variable GSE_PATH is used."
 
      FORCE
 
    )
 
  ENDIF(APPLE)
 
  SET(SDK_PACKAGE_GENERATOR_ADDITIONAL_PACKAGE "" CACHE PATH "Path to additonal CPackPackages.cmake")
 
ELSE(SDK_PACKAGE_GENERATOR OR GSE_SDK_PROJECT)
 
  SET(PATH_GSE "${PROJECT_SOURCE_DIR}" CACHE PATH "This path has to point to the GSE root directory.")
 
ENDIF(SDK_PACKAGE_GENERATOR OR GSE_SDK_PROJECT)
 
 
 
LIST(APPEND PREPROCESSOR_DEFINES "PATH_GSE=\"${PATH_GSE}\"")
 
 
 
# ========== Set application specific includes ==========
 
INCLUDE_DIRECTORIES(
 
  "${PROJECT_SOURCE_DIR}/Include"
 
  "${PROJECT_SOURCE_DIR}/Include/Behaviour"
 
  "${PROJECT_SOURCE_DIR}/Include/Command"
 
  "${PROJECT_SOURCE_DIR}/Include/Control"
 
  "${PROJECT_SOURCE_DIR}/Include/Dialog"
 
  "${PROJECT_SOURCE_DIR}/Include/GUIConfig"
 
  "${PROJECT_SOURCE_DIR}/Include/Undo"
 
  "${GSE_ROOT_PATH_STREAMRUNTIME}/Include/CustomExtension"
 
  "${GSE_ROOT_PATH_STREAMRUNTIME}/Include/GUIConfigCustom"
 
)
 
 
 
IF(NOT GSE_SDK_PROJECT) #Default case to build GSE
 
  # ========== Set include directories ==========
 
  INCLUDE("${PATH_COMMON}/Include_directories.cmake")
 
 
 
  INCLUDE_DIRECTORIES(
 
    "${GSE_ROOT_PATH_RESOURCECOMPILER}/Include"
 
)
 
 
 
  # ========== GSElib Source files ==========
 
  # SOURCE_GROUP creates the "folder-structure" in VS
 
  FILE(GLOB GSELIB_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/*.cpp")
 
  LIST(APPEND GSELIB_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/md5.cpp")
 
  FILE(GLOB GSELIB_BHVR_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/Behaviour/*.cpp")
 
  FILE(GLOB GSELIB_CMD_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/Command/*.cpp")
 
  FILE(GLOB GSELIB_CTRL_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/Control/*.cpp")
 
  FILE(GLOB GSELIB_DIALOG_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/Dialog/*.cpp")
 
  FILE(GLOB GSELIB_UNDO_SOURCE_CPP "${PROJECT_SOURCE_DIR}/Source/Undo/*.cpp")
 
  FILE(GLOB GSELIB_CUSTOM_TEMPLATES "${PROJECT_SOURCE_DIR}/Resources/CustomTemplates/*.tpl")
 
  SOURCE_GROUP("Source Files" FILES ${GSELIB_SOURCE_CPP})
 
  SOURCE_GROUP("Source Files\\Behaviour" FILES ${GSELIB_BHVR_SOURCE_CPP})
 
  SOURCE_GROUP("Source Files\\Command" FILES ${GSELIB_CMD_SOURCE_CPP})
 
  SOURCE_GROUP("Source Files\\Control" FILES ${GSELIB_CTRL_SOURCE_CPP})
 
  SOURCE_GROUP("Source Files\\Dialog" FILES ${GSELIB_DIALOG_SOURCE_CPP})
 
  SOURCE_GROUP("Source Files\\Undo" FILES ${GSELIB_UNDO_SOURCE_CPP})
 
  SOURCE_GROUP("Custom Templates" FILES ${GSELIB_CUSTOM_TEMPLATES})
 
 
 
  FILE(GLOB GSELIB_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/*.h")
 
  FILE(GLOB GSELIB_BHVR_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/Behaviour/*.h")
 
  FILE(GLOB GSELIB_CMD_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/Command/*.h")
 
  FILE(GLOB GSELIB_CTRL_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/Control/*.h")
 
  FILE(GLOB GSELIB_DIALOG_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/Dialog/*.h")
 
  FILE(GLOB GSELIB_UNDO_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/Undo/*.h")
 
  FILE(GLOB GSELIB_GUICONFIG_SOURCE_H "${PROJECT_SOURCE_DIR}/Include/GUIConfig/*.h")
 
  SOURCE_GROUP("Header Files" FILES ${GSELIB_SOURCE_H})
 
  SOURCE_GROUP("Header Files\\Behaviour" FILES ${GSELIB_BHVR_SOURCE_H})
 
  SOURCE_GROUP("Header Files\\Command" FILES ${GSELIB_CMD_SOURCE_H})
 
  SOURCE_GROUP("Header Files\\Control" FILES ${GSELIB_CTRL_SOURCE_H})
 
  SOURCE_GROUP("Header Files\\Dialog" FILES ${GSELIB_DIALOG_SOURCE_H})
 
  SOURCE_GROUP("Header Files\\Undo" FILES ${GSELIB_UNDO_SOURCE_H})
 
  SOURCE_GROUP("Header Files\\GUIConfig" FILES ${GSELIB_GUICONFIG_SOURCE_H})
 
 
 
  FILE(GLOB GSELIB_LANGUAGE_FILES "${PROJECT_SOURCE_DIR}/Resources/LanguageFiles/*.lng")
 
  SOURCE_GROUP("Language Files" FILES ${GSELIB_LANGUAGE_FILES})
 
 
 
  # ========== Create complete list of files for GSElib ==========
 
  SET(GSELIB_SOURCES_LIST
 
    ${GSELIB_SOURCE_CPP}
 
    ${GSELIB_BHVR_SOURCE_CPP}
 
    ${GSELIB_CMD_SOURCE_CPP}
 
    ${GSELIB_CTRL_SOURCE_CPP}
 
    ${GSELIB_DIALOG_SOURCE_CPP}
 
    ${GSELIB_UNDO_SOURCE_CPP}
 
    ${GSELIB_CUSTOM_TEMPLATES}
 
    ${GSELIB_SOURCE_H}
 
    ${GSELIB_BHVR_SOURCE_H}
 
    ${GSELIB_CMD_SOURCE_H}
 
    ${GSELIB_CTRL_SOURCE_H}
 
    ${GSELIB_DIALOG_SOURCE_H}
 
    ${GSELIB_UNDO_SOURCE_H}
 
    ${GSELIB_GUICONFIG_SOURCE_H}
 
    ${GSELIB_LANGUAGE_FILES}
 
    ${PLATFORM_FILES_GSELIB}
 
)
 
  SET(GSE_GUICONFIG_CPP "${PATH_GUILIANI}/Share/GUIConfig.cpp") # GUIConfig.cpp from Guiliani path
 
 
 
ELSE(NOT GSE_SDK_PROJECT) #SDK uses the directories inside the GSE structure
 
  INCLUDE_DIRECTORIES(
 
    "${PROJECT_SOURCE_DIR}/../eGaC/Include/eC"
 
    "${PROJECT_SOURCE_DIR}/../eGaC/Include/eDBG"
 
    "${PROJECT_SOURCE_DIR}/../eGaC/Include/eGML"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Core"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/GUIConfig"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/ImageDecoder"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Platform/eGML"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Platform/general"
 
    "${PROJECT_SOURCE_DIR}/../Guiliani/Include/Platform/GL"
 
)
 
  INCLUDE("${PATH_COMMON}/Include_directories.cmake")
 
  SET(GSE_GUICONFIG_CPP "${PROJECT_SOURCE_DIR}/Share/GUIConfig.cpp") # GUIConfig.cpp from inside GSE
 
ENDIF(NOT GSE_SDK_PROJECT)
 
 
 
# ========== GSE Source files ==========
 
# SOURCE_GROUP creates the "folder-structure" in VS
 
SOURCE_GROUP("GUIConfig" FILES ${GSE_GUICONFIG_CPP})
 
 
 
FILE(GLOB GSE_CUSTOM_SOURCE_CPP "${GSE_ROOT_PATH_STREAMRUNTIME}/Source/CustomExtension/*.cpp")
 
SOURCE_GROUP("Source Files\\Custom Extension" FILES ${GSE_CUSTOM_SOURCE_CPP})
 
 
 
FILE(GLOB GSE_CUSTOM_SOURCE_H "${GSE_ROOT_PATH_STREAMRUNTIME}/Include/CustomExtension/*.h")
 
FILE(GLOB GSE_CUSTOM_GUICONFIG_SOURCE_H "${GSE_ROOT_PATH_STREAMRUNTIME}/Include/GUIConfigCustom/*.h")
 
SOURCE_GROUP("Header Files\\Custom Extension" FILES ${GSE_CUSTOM_SOURCE_H})
 
SOURCE_GROUP("Header Files\\Custom Resource IDs" FILES ${GSE_CUSTOM_GUICONFIG_SOURCE_H})
 
 
 
FILE(GLOB GSE_PLATFORM_GENERAL_CPP "${PROJECT_SOURCE_DIR}/Source/Platform/general/*.cpp")
 
SOURCE_GROUP("Source Files\\Platform\\General" FILES ${GSE_PLATFORM_GENERAL_CPP})
 
 
 
# ========== Create complete list of files for GSE binary ==========
 
SET(GSE_SOURCES_LIST
 
  ${GSE_GUICONFIG_CPP}
 
  ${GSE_CUSTOM_SOURCE_CPP}
 
  ${GSE_CUSTOM_SOURCE_H}
 
  ${GSE_CUSTOM_GUICONFIG_SOURCE_H}
 
  ${GSE_PLATFORM_GENERAL_CPP}
 
  ${RESOURCE_FILE}
 
)
 
 
 
SET(GSE_PROJECT 1) #this variable is used in StreamRuntime and ResourceCompiler to avoid adding Guiliani and eGaC project twice.
 
 
 
# ========== Build GSE binary ==========
 
IF(GSE_MAKE_BUNDLE)
 
  SET(ADD_EXECUTABLE_PARAMETERS "MACOSX_BUNDLE")
 
ENDIF(GSE_MAKE_BUNDLE)
 
 
 
ADD_EXECUTABLE(${PROJECT_NAME} ${ADD_EXECUTABLE_PARAMETERS} ${GSE_SOURCES_LIST})
 
 
 
# ========== Add StreamRuntime ==========
 
ADD_SUBDIRECTORY("${GSE_ROOT_PATH_STREAMRUNTIME}" ./StreamRuntime)
 
 
 
IF(NOT GSE_SDK_PROJECT) #if no SDK we add to solution: GSElib, Guiliani, GUIResourceCompiler and link against these projects.
 
  # ========== Add eGaC ==========
 
  IF(EXISTS "${PATH_EGAC}/CMakeLists.txt")
 
      ADD_SUBDIRECTORY("${PATH_EGAC}" ./eGaC)
 
  ELSE(EXISTS "${PATH_EGAC}/CMakeLists.txt")
 
      MESSAGE(FATAL_ERROR "Path not set or wrong to eGaC directory.")
 
  ENDIF(EXISTS "${PATH_EGAC}/CMakeLists.txt")
 
 
 
  # ========== Add Guiliani ==========
 
  IF(EXISTS "${PATH_GUILIANI}/CMakeLists.txt")
 
      ADD_SUBDIRECTORY("${PATH_GUILIANI}" ./Guiliani)
 
  ELSE(EXISTS "${PATH_GUILIANI}/CMakeLists.txt")
 
      MESSAGE(FATAL_ERROR "Path not set or wrong to Guiliani directory.")
 
  ENDIF(EXISTS "${PATH_GUILIANI}/CMakeLists.txt")
 
 
 
  # ========== Add GUIResourceCompiler ==========
 
  IF(EXISTS "${GSE_ROOT_PATH_RESOURCECOMPILER}/CMakeLists.txt")
 
      ADD_SUBDIRECTORY("${GSE_ROOT_PATH_RESOURCECOMPILER}" ./GUIResourceCompiler)
 
  ELSE(EXISTS "${GSE_ROOT_PATH_RESOURCECOMPILER}/CMakeLists.txt")
 
      MESSAGE(FATAL_ERROR "Path not set or wrong to GUIResourceCompiler directory.")
 
  ENDIF(EXISTS "${GSE_ROOT_PATH_RESOURCECOMPILER}/CMakeLists.txt")
 
 
 
  # ========== Build GSE library ==========
 
  ADD_LIBRARY(GSElib STATIC ${GSELIB_SOURCES_LIST})
 
ENDIF(NOT GSE_SDK_PROJECT)
 
 
 
# ========== Link the executable to the needed libraries ==========
 
TARGET_LINK_LIBRARIES(${PROJECT_NAME}
 
  GSElib
 
  GUIResourceCompilerLib
 
  Guiliani
 
  eGaC
 
  ${PLATFORM_LIBS}
 
)
 
 
 
# ========== StreamRuntime must be build prior to GSE ==========
 
ADD_DEPENDENCIES(${PROJECT_NAME} ${STREAMRUNTIME_APPNAME})
 
 
 
# ========== Set output directories ==========
 
SET(RESOURCE_DIR "${PROJECT_SOURCE_DIR}/Resources")
 
 
 
IF(MSVC_IDE)
 
  SET(BINARY_DIR "${PROJECT_SOURCE_DIR}/Binary/win/pc")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGEVALUATION ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEEVALUATION ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_NAME "GSE")
 
 
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${RESOURCE_DIR})
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${RESOURCE_DIR}) 
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGEVALUATION ${RESOURCE_DIR})
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEEVALUATION ${RESOURCE_DIR})
 
ENDIF(MSVC_IDE)
 
 
 
IF(APPLE AND NOT GSE_MAKE_BUNDLE)
 
  SET(BINARY_DIR "${PROJECT_SOURCE_DIR}/../../bin/OSX")
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGEVALUATION ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEEVALUATION ${BINARY_DIR})
 
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_NAME "GSE")
 
 
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${RESOURCE_DIR})
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${RESOURCE_DIR}) 
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUGEVALUATION ${RESOURCE_DIR})
 
  SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASEEVALUATION ${RESOURCE_DIR})
 
ENDIF(APPLE AND NOT GSE_MAKE_BUNDLE)
 
 
 
SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${RESOURCE_DIR})
 
SET_TARGET_PROPERTIES(${STREAMRUNTIME_APPNAME} PROPERTIES RUNTIME_OUTPUT_NAME "${STREAMRUNTIME_APPNAME}")
 
 
 
# ========== Set preprocessor defines ==========
 
SET(PREPROCESSOR_DEFINES "${PREPROCESSOR_DEFINES};GSE_STREAMRUNTIME_BINARY_NAME=\"${STREAMRUNTIME_APPNAME}\";GSE_STREAMRUNTIME_ROOT_DIR=\"${GSE_ROOT_PATH_STREAMRUNTIME}\"")
 
 
 
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS "${PREPROCESSOR_DEFINES}")
 
 
 
IF(NOT GSE_SDK_PROJECT) # Target GSElib doesn't exists in SDK build
 
  SET_TARGET_PROPERTIES(GSElib PROPERTIES COMPILE_DEFINITIONS "${PREPROCESSOR_DEFINES};GSE_GSELIB")
 
  SET_TARGET_PROPERTIES(GSElib PROPERTIES COMPILE_DEFINITIONS_DEBUGEVALUATION "GSE_EVALUATION")
 
  SET_TARGET_PROPERTIES(GSElib PROPERTIES COMPILE_DEFINITIONS_RELEASEEVALUATION "GSE_EVALUATION")
 
  SET_TARGET_PROPERTIES(Guiliani PROPERTIES COMPILE_DEFINITIONS_DEBUGEVALUATION "GUILIANI_EVALUATION")
 
  SET_TARGET_PROPERTIES(Guiliani PROPERTIES COMPILE_DEFINITIONS_RELEASEEVALUATION "GUILIANI_EVALUATION")
 
  IF(WIN32)
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_DEBUGEVALUATION "eGML_EVALLIB")
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_RELEASEEVALUATION "eGML_EVALLIB")
 
  ELSE(WIN32)
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_DEBUGEVALUATION "eGML_EVALLIB2")
 
    SET_TARGET_PROPERTIES(eGaC PROPERTIES COMPILE_DEFINITIONS_RELEASEEVALUATION "eGML_EVALLIB2")
 
  ENDIF(WIN32)
 
ENDIF(NOT GSE_SDK_PROJECT)
 
 
 
# ========== Create MacOSX application bundle ==========
 
 
 
IF(GSE_MAKE_BUNDLE)
 
 
 
  # Include common Apple bundle settings
 
  INCLUDE("${PATH_COMMON}/Common_Apple_settings.cmake")
 
 
 
  IF(APPLE)
 
    IF(NOT CMAKE_PLATFORM_NAME STREQUAL "iphonesimulator" AND NOT CMAKE_PLATFORM_NAME STREQUAL "iphoneos")
 
   
 
      # Variable to the resources directory
 
      SET(RESOURCES_DIR ${PROJECT_SOURCE_DIR})
 
     
 
      IF(NOT GSE_SDK_PROJECT)
 
        IF(NOT GSE_MAKE_BUNDLE_EVAL)
 
 
 
          # - Remove old content.
 
          # - Run the mkdist.sh script to generate customer GSE version.
 
          # - Copy the icon file into the bundle.
 
          ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME}
 
            POST_BUILD
 
            COMMAND rm -rf ${APPLICATION_NAME}/Contents/Resources
 
            COMMAND ${RESOURCES_DIR}/tools/mkdist.sh Resources ${APPLICATION_NAME}/Contents ${RESOURCES_DIR}/../ ${RESOURCES_DIR}/../Libs OSX
 
            COMMAND cp ${RESOURCES_DIR}/Resources/GSE.icns ${APPLICATION_NAME}/Contents/Resources
 
          )
 
       
 
        ELSE(NOT GSE_MAKE_BUNDLE_EVAL)
 
     
 
          # - Remove old content.
 
          # - Run the mkdist.sh script to generate customer GSE version.
 
          # - Copy the icon file into the bundle.
 
          ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME}
 
            POST_BUILD
 
            COMMAND rm -rf ${APPLICATION_NAME}/Contents/Resources
 
            COMMAND ${RESOURCES_DIR}/tools/mkdist.sh Resources ${APPLICATION_NAME}/Contents ${RESOURCES_DIR}/../ ${RESOURCES_DIR}/../Libs OSX EVAL
 
            COMMAND cp ${RESOURCES_DIR}/Resources/GSE.icns ${APPLICATION_NAME}/Contents/Resources
 
        )
 
 
 
        ENDIF(NOT GSE_MAKE_BUNDLE_EVAL)
 
      ELSE(NOT GSE_SDK_PROJECT)
 
     
 
        # - Remove old content.
 
        # - Copy the resources into the bundle.
 
        # - Copy the StreamRuntime binary into the bundle.
 
        # - Copy the icon file into the bundle.
 
        ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME}
 
          POST_BUILD
 
          COMMAND rm -rf ${APPLICATION_NAME}/Contents/Resources
 
          COMMAND cp -r ${RESOURCES_DIR} ${APPLICATION_NAME}/Contents/Resources
 
          COMMAND cp ${RESOURCES_DIR}/StreamRuntime/bin/OSX/StreamRuntime ${APPLICATION_NAME}/Contents/Resources/Resources
 
          COMMAND cp ${RESOURCES_DIR}/Resources/GSE.icns ${APPLICATION_NAME}/Contents/Resources
 
      )
 
 
 
      ENDIF(NOT GSE_SDK_PROJECT)
 
    ENDIF(NOT CMAKE_PLATFORM_NAME STREQUAL "iphonesimulator" AND NOT CMAKE_PLATFORM_NAME STREQUAL "iphoneos")
 
  ENDIF(APPLE)
 
ENDIF(GSE_MAKE_BUNDLE)
 
 
 
IF(SDK_PACKAGE_GENERATOR)
 
  IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../CPackPackages.cmake")
 
    INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../CPackPackages.cmake)
 
  ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../CPackPackages.cmake")
 
  IF(EXISTS "${PATH_COMMON}/CPackPackages.cmake")
 
    INCLUDE (${PATH_COMMON}/CPackPackages.cmake)
 
  ENDIF(EXISTS "${PATH_COMMON}/CPackPackages.cmake")
 
  IF(EXISTS "${PATH_LIBS}/CPackPackages.cmake")
 
    INCLUDE (${PATH_LIBS}/CPackPackages.cmake)
 
  ENDIF(EXISTS "${PATH_LIBS}/CPackPackages.cmake")
 
  INCLUDE(CPackPackages.cmake)
 
  INCLUDE(CPackConfiguration.cmake)
 
  # Dirty but currently neccessary to add an additonal project
 
  IF(EXISTS "${SDK_PACKAGE_GENERATOR_ADDITIONAL_PACKAGE}/CPackPackages.cmake")
 
      SET(PROJECT_SOURCE_DIR ${SDK_PACKAGE_GENERATOR_ADDITIONAL_PACKAGE})
 
      INCLUDE(${SDK_PACKAGE_GENERATOR_ADDITIONAL_PACKAGE}/CPackPackages.cmake)
 
  ENDIF(EXISTS "${SDK_PACKAGE_GENERATOR_ADDITIONAL_PACKAGE}/CPackPackages.cmake")
 
ENDIF(SDK_PACKAGE_GENERATOR)
 

Latest revision as of 05:51, 15 April 2021