123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- cmake_minimum_required(VERSION 2.8.11)
- option(BUILD_EMULATOR "Build with cpp3ds emulator (Qt5 required)" OFF)
- option(BUILD_TESTS "Build unit tests" OFF)
- # Project name without spaces or special characters
- project("clock")
- set(APP_TITLE "Clock")
- set(APP_DESCRIPTION "A simple clock app for the 3DS")
- set(APP_AUTHOR "arc13")
- set(APP_ICON ${PROJECT_SOURCE_DIR}/res/app/icon.png)
- set(APP_LOGO ${PROJECT_SOURCE_DIR}/res/app/logo.bcma.lz)
- # First one is Title Version, second is the readable version
- set(APP_VERSION 1040)
- add_definitions(-DCLOCK_DIR="sdmc:/3ds/data/Clock")
- # CIA settings
- set(APP_UNIQUE_ID 0xC10C4) # This must be unique for your CIA project
- set(APP_PRODUCT_CODE ${PROJECT_NAME})
- set(BANNER_IMAGE ${PROJECT_SOURCE_DIR}/res/app/banner.png)
- set(BANNER_SOUND ${PROJECT_SOURCE_DIR}/res/app/banner.wav)
- set(ICON_FLAGS --flags visible,ratingrequired,recordusage,savedata --cero 153 --esrb 153 --usk 153 --pegigen 153 --pegiptr 153 --pegibbfc 153 --cob 153 --grb 153 --cgsrr 153)
- set(CIA_CONFIG ${PROJECT_SOURCE_DIR}/res/app/cia.rsf)
- # Include cpp3ds cmake module
- set(CPP3DS $ENV{CPP3DS})
- if(NOT CPP3DS)
- message(FATAL_ERROR "You need to set the env variable CPP3DS before compiling.")
- endif()
- set(CMAKE_MODULE_PATH "${CPP3DS}/cmake" ${CMAKE_MODULE_PATH})
- include(cpp3ds)
- include_directories(
- ${PROJECT_SOURCE_DIR}/external/tween-engine/include
- ${PROJECT_SOURCE_DIR}/external/rapidjson/include
- )
- FILE(GLOB_RECURSE TWEEN_ENGINE_SOURCE ${PROJECT_SOURCE_DIR}/external/tween-engine/src/*.cpp)
- set(SOURCE_FILES
- ${PROJECT_SOURCE_DIR}/src/main.cpp
- ${PROJECT_SOURCE_DIR}/src/Clock.cpp
- ${PROJECT_SOURCE_DIR}/src/MusicBCSTM.cpp
- ${PROJECT_SOURCE_DIR}/src/MusicMP3.cpp
- ${PROJECT_SOURCE_DIR}/src/Util.cpp
- ${PROJECT_SOURCE_DIR}/src/AssetManager.hpp
- ${PROJECT_SOURCE_DIR}/src/Notification.cpp
- ${PROJECT_SOURCE_DIR}/src/TopInformations.cpp
- ${PROJECT_SOURCE_DIR}/src/ClockItem.cpp
- ${PROJECT_SOURCE_DIR}/src/CalendarBlock.cpp
- ${PROJECT_SOURCE_DIR}/src/Calendar.cpp
- ${PROJECT_SOURCE_DIR}/src/IconSet.cpp
- ${PROJECT_SOURCE_DIR}/src/Stopwatch.cpp
- ${PROJECT_SOURCE_DIR}/src/Chronometer.hpp
- ${PROJECT_SOURCE_DIR}/src/LapList.cpp
- ${PROJECT_SOURCE_DIR}/src/LapItem.cpp
- ${PROJECT_SOURCE_DIR}/src/Timer.cpp
- ${PROJECT_SOURCE_DIR}/src/AlarmItem.cpp
- ${PROJECT_SOURCE_DIR}/src/Alarm.cpp
- ${PROJECT_SOURCE_DIR}/src/Config.cpp
- ${PROJECT_SOURCE_DIR}/src/Keyboard/Keyboard.cpp
- ${PROJECT_SOURCE_DIR}/src/Keyboard/tinyxml2.cpp
- ${PROJECT_SOURCE_DIR}/src/GUI/Button.cpp
- ${PROJECT_SOURCE_DIR}/src/GUI/NinePatch.cpp
- ${PROJECT_SOURCE_DIR}/src/GUI/Scrollable.cpp
- ${PROJECT_SOURCE_DIR}/src/GUI/ScrollBar.cpp
- ${PROJECT_SOURCE_DIR}/src/States/State.cpp
- ${PROJECT_SOURCE_DIR}/src/States/StateStack.cpp
- ${PROJECT_SOURCE_DIR}/src/States/DefaultState.cpp
- ${PROJECT_SOURCE_DIR}/src/States/DialogState.cpp
- ${TWEEN_ENGINE_SOURCE}
- )
- set(ARM_SOURCE_FILES
- ${PROJECT_SOURCE_DIR}/src/KeyboardApplet.cpp
- )
- # Use either nihstro or picasso for your shader scripts
- set(SHADER_AS nihstro)
- FILE(GLOB_RECURSE SHADER_FILES ${PROJECT_SOURCE_DIR}/res/romfs/shaders/[^.]*.vsh)
- ##################################################
- # Don't usually need to change anything below
- ##################################################
- set(CPP3DS_ARM_FLAGS "-g -O3 -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft")
- set(CPP3DS_EMU_FLAGS "-O0")
- set(TEST_FLAGS "-O0 -coverage")
- include_directories(${DEVKITPRO}/portlibs/armv6k/include)
- set(CPP3DS_ARM_LIBS cpp3ds-window cpp3ds-network cpp3ds-graphics cpp3ds-audio cpp3ds-system citro3d ctru freetype png z vorbisidec ogg archive faad fmt)
- set(CPP3DS_EMU_LIBS cpp3ds-emu sfml-graphics sfml-window sfml-system sfml-audio openal GLEW GL jpeg freetype vorbisfile vorbis ogg ssl crypto pthread archive faad fmt)
- add_subdirectory(${CPP3DS}/cmake/template_arm build/arm)
- if(BUILD_EMULATOR)
- add_subdirectory(${CPP3DS}/cmake/template_emu build/emu)
- endif()
- if(BUILD_TESTS)
- add_subdirectory(test)
- endif()
|