2022-01-24 13:25:23 +08:00
|
|
|
project(CDROID C CXX)
|
2021-06-24 10:12:55 +08:00
|
|
|
cmake_minimum_required (VERSION 3.2)
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
2023-04-11 18:14:57 +08:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2021-06-24 10:12:55 +08:00
|
|
|
|
2023-04-11 10:53:24 +08:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
|
2021-06-24 10:12:55 +08:00
|
|
|
include(cmake/common_functions.cmake)
|
|
|
|
include(cmake/options.cmake)
|
|
|
|
|
2022-11-26 23:21:07 +08:00
|
|
|
set(DISABLE_FORCE_DEBUG_POSTFIX ON)
|
2022-11-30 17:11:10 +08:00
|
|
|
|
2021-06-24 10:12:55 +08:00
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
add_definitions(-DDEBUG)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_subdirectory(src/porting)
|
2022-12-23 11:39:34 +08:00
|
|
|
add_subdirectory(src/gui)
|
|
|
|
add_subdirectory(src/modules)
|
|
|
|
|
2021-06-24 10:12:55 +08:00
|
|
|
add_subdirectory(apps)
|
|
|
|
|
|
|
|
add_subdirectory(tests)
|
|
|
|
|
2023-03-25 17:29:54 +08:00
|
|
|
include (InstallRequiredSystemLibraries)
|
|
|
|
#set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
|
|
|
|
set (CPACK_COMPONENT_LIBRARIES_DEPENDS ${CDROID_DEPLIBS})
|
|
|
|
set (CPACK_PACKAGE_VERSION_MAJOR "1")
|
|
|
|
set (CPACK_PACKAGE_VERSION_MINOR "0")
|
|
|
|
include (CPack)
|
|
|
|
|
2023-04-11 10:53:24 +08:00
|
|
|
set(APPS ${CMAKE_INSTALL_PREFIX}/bin/uidemo2) # paths to executables
|
|
|
|
set(DIRS "$ENV{HOME}/vcpkg/installed/arm-linux-dynamic"
|
|
|
|
"${CMAKE_INSTALL_PREFIX}/lib") # directories to search for prerequisites
|
|
|
|
INSTALL(CODE "
|
|
|
|
include(BundleUtilities)
|
|
|
|
fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\")
|
|
|
|
" COMPONENT Runtime)
|
|
|
|
|
2021-06-24 10:12:55 +08:00
|
|
|
if(BUILD_DOCS)
|
2022-11-30 17:11:10 +08:00
|
|
|
include(cmake/build_doxygen.cmake)
|
|
|
|
build_doxygen()
|
2021-06-24 10:12:55 +08:00
|
|
|
endif()
|
|
|
|
|