2023-09-03 16:47:33 +00:00
|
|
|
cmake_minimum_required(VERSION 3.19)
|
2023-03-06 19:19:45 +00:00
|
|
|
|
2023-09-03 16:47:33 +00:00
|
|
|
cmake_policy(VERSION 3.19)
|
2023-06-24 16:48:30 +00:00
|
|
|
message(STATUS "Using CMake ${CMAKE_VERSION}")
|
2023-06-24 19:58:45 +00:00
|
|
|
if (CMAKE_MESSAGE_LOG_LEVEL)
|
|
|
|
message(STATUS "Message log level is set to ${CMAKE_MESSAGE_LOG_LEVEL}")
|
|
|
|
endif ()
|
2023-03-06 19:19:45 +00:00
|
|
|
|
2023-07-02 22:38:21 +00:00
|
|
|
include(cmake/ParseLibretroInfo.cmake)
|
|
|
|
|
|
|
|
project("${MELONDSDS_INFO_corename}"
|
|
|
|
VERSION "${MELONDSDS_INFO_display_version}"
|
|
|
|
DESCRIPTION "${MELONDSDS_INFO_description}"
|
2023-03-06 19:19:45 +00:00
|
|
|
HOMEPAGE_URL "https://melonds.kuribo64.net"
|
|
|
|
LANGUAGES C CXX)
|
|
|
|
|
2023-08-06 16:03:22 +00:00
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
2023-06-24 01:07:45 +00:00
|
|
|
include(CheckSymbolExists)
|
2023-06-24 16:50:00 +00:00
|
|
|
include(CheckIncludeFile)
|
|
|
|
include(CheckIncludeFiles)
|
2023-08-06 19:30:17 +00:00
|
|
|
include(CheckTypeSize)
|
2023-03-06 19:19:45 +00:00
|
|
|
include(FetchContent)
|
2023-07-10 18:44:24 +00:00
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
|
2023-03-06 19:19:45 +00:00
|
|
|
|
2023-08-06 16:02:24 +00:00
|
|
|
find_package(Git REQUIRED)
|
2023-09-03 16:47:23 +00:00
|
|
|
include(GitInfo)
|
|
|
|
|
|
|
|
message(STATUS "Git revision: ${GIT_REVISION}")
|
2023-03-06 19:19:45 +00:00
|
|
|
|
2023-07-19 21:27:34 +00:00
|
|
|
option(TRACY_ENABLE "Build with Tracy support." OFF)
|
|
|
|
|
2023-06-24 19:07:15 +00:00
|
|
|
include(cmake/utils.cmake)
|
2023-07-10 18:44:24 +00:00
|
|
|
include(cmake/FetchDependencies.cmake)
|
|
|
|
include(cmake/ConfigureFeatures.cmake)
|
2023-07-10 17:24:08 +00:00
|
|
|
include(cmake/ConfigureDependencies.cmake)
|
2023-03-06 22:45:53 +00:00
|
|
|
|
2023-09-03 16:40:36 +00:00
|
|
|
option(BUILD_TESTING "Build test suite." OFF)
|
|
|
|
include(CTest)
|
|
|
|
|
2023-06-24 19:07:15 +00:00
|
|
|
add_subdirectory(src/libretro)
|
2023-09-03 16:40:36 +00:00
|
|
|
if (BUILD_TESTING)
|
|
|
|
message(STATUS "Enabling test suite.")
|
|
|
|
enable_testing()
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
2023-06-24 19:07:15 +00:00
|
|
|
|
|
|
|
dump_cmake_variables()
|