CMakeLists.txt 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. cmake_minimum_required(VERSION 2.8.11)
  2. option(BUILD_EMULATOR "Build with cpp3ds emulator (Qt5 required)" OFF)
  3. option(BUILD_TESTS "Build unit tests" OFF)
  4. # Project name without spaces or special characters
  5. project("advdsprofile")
  6. set(APP_TITLE "Adv DS Profile")
  7. set(APP_DESCRIPTION "Advanced DS Profile")
  8. set(APP_AUTHOR "arc13")
  9. set(APP_ICON ${PROJECT_SOURCE_DIR}/res/app/icon.png)
  10. set(APP_LOGO ${PROJECT_SOURCE_DIR}/res/app/logo.bcma.lz)
  11. # First one is Title Version, second is the readable version
  12. set(APP_VERSION 1024)
  13. # CIA settings
  14. set(APP_UNIQUE_ID 0xADD56) # This must be unique for your CIA project
  15. set(APP_PRODUCT_CODE ${PROJECT_NAME})
  16. set(BANNER_IMAGE ${PROJECT_SOURCE_DIR}/res/app/banner.png)
  17. set(BANNER_SOUND ${PROJECT_SOURCE_DIR}/res/app/banner.wav)
  18. 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)
  19. set(CIA_CONFIG ${PROJECT_SOURCE_DIR}/res/app/cia.rsf)
  20. # Include cpp3ds cmake module
  21. set(CPP3DS $ENV{CPP3DS})
  22. if(NOT CPP3DS)
  23. message(FATAL_ERROR "You need to set the env variable CPP3DS before compiling.")
  24. endif()
  25. set(CMAKE_MODULE_PATH "${CPP3DS}/cmake" ${CMAKE_MODULE_PATH})
  26. include(cpp3ds)
  27. include_directories(
  28. ${PROJECT_SOURCE_DIR}/external/tween-engine/include
  29. )
  30. FILE(GLOB_RECURSE TWEEN_ENGINE_SOURCE ${PROJECT_SOURCE_DIR}/external/tween-engine/src/*.cpp)
  31. set(SOURCE_FILES
  32. ${PROJECT_SOURCE_DIR}/src/main.cpp
  33. ${PROJECT_SOURCE_DIR}/src/AdvDSProfile.cpp
  34. ${PROJECT_SOURCE_DIR}/src/MusicBCSTM.cpp
  35. ${PROJECT_SOURCE_DIR}/src/MusicMP3.cpp
  36. ${PROJECT_SOURCE_DIR}/src/Util.cpp
  37. ${PROJECT_SOURCE_DIR}/src/AssetManager.hpp
  38. ${PROJECT_SOURCE_DIR}/src/Notification.cpp
  39. ${PROJECT_SOURCE_DIR}/src/TopInformations.cpp
  40. ${PROJECT_SOURCE_DIR}/src/Keyboard/Keyboard.cpp
  41. ${PROJECT_SOURCE_DIR}/src/Keyboard/tinyxml2.cpp
  42. ${PROJECT_SOURCE_DIR}/src/GUI/Button.cpp
  43. ${PROJECT_SOURCE_DIR}/src/GUI/NinePatch.cpp
  44. ${PROJECT_SOURCE_DIR}/src/GUI/Scrollable.cpp
  45. ${PROJECT_SOURCE_DIR}/src/GUI/ScrollBar.cpp
  46. ${PROJECT_SOURCE_DIR}/src/States/State.cpp
  47. ${PROJECT_SOURCE_DIR}/src/States/StateStack.cpp
  48. ${PROJECT_SOURCE_DIR}/src/States/DefaultState.cpp
  49. ${PROJECT_SOURCE_DIR}/src/States/DialogState.cpp
  50. ${TWEEN_ENGINE_SOURCE}
  51. )
  52. set(ARM_SOURCE_FILES
  53. ${PROJECT_SOURCE_DIR}/src/KeyboardApplet.cpp
  54. ${PROJECT_SOURCE_DIR}/src/Nvram.cpp
  55. )
  56. # Use either nihstro or picasso for your shader scripts
  57. set(SHADER_AS nihstro)
  58. FILE(GLOB_RECURSE SHADER_FILES ${PROJECT_SOURCE_DIR}/res/romfs/shaders/[^.]*.vsh)
  59. ##################################################
  60. # Don't usually need to change anything below
  61. ##################################################
  62. set(CPP3DS_ARM_FLAGS "-g -O3 -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft")
  63. set(CPP3DS_EMU_FLAGS "-O0")
  64. set(TEST_FLAGS "-O0 -coverage")
  65. include_directories(${DEVKITPRO}/portlibs/armv6k/include)
  66. set(CPP3DS_ARM_LIBS cpp3ds-window cpp3ds-network cpp3ds-graphics cpp3ds-audio cpp3ds-system citro3d ctru freetype png z vorbisidec ogg archive faad fmt)
  67. 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)
  68. add_subdirectory(${CPP3DS}/cmake/template_arm build/arm)
  69. if(BUILD_EMULATOR)
  70. add_subdirectory(${CPP3DS}/cmake/template_emu build/emu)
  71. endif()
  72. if(BUILD_TESTS)
  73. add_subdirectory(test)
  74. endif()