2017-03-23 12:17:00 +00:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
2019-01-18 16:04:32 +00:00
|
|
|
set(WUT_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
set(ENV{WUT_ROOT} "${WUT_ROOT}")
|
|
|
|
set(CMAKE_TOOLCHAIN_FILE "${WUT_ROOT}/share/wut.toolchain.cmake")
|
2017-03-23 12:17:00 +00:00
|
|
|
|
2019-01-18 16:04:32 +00:00
|
|
|
project(wut)
|
2018-05-23 11:09:48 +01:00
|
|
|
option(WUT_BUILD_DOCS "Build documentation" OFF)
|
2018-05-22 23:08:13 +01:00
|
|
|
|
2018-05-25 13:54:58 +01:00
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib")
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/lib")
|
|
|
|
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib")
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/lib")
|
|
|
|
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin")
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/bin")
|
|
|
|
|
2018-05-23 11:09:48 +01:00
|
|
|
if(WUT_BUILD_DOCS)
|
|
|
|
add_subdirectory(docs)
|
|
|
|
endif()
|
|
|
|
|
2019-01-18 16:04:32 +00:00
|
|
|
find_program(WUT_RPLIMPORTGEN NAMES rplimportgen PATHS "${DEVKITPRO}/tools/bin")
|
|
|
|
if(NOT WUT_RPLIMPORTGEN)
|
|
|
|
message(FATAL_ERROR "Could not find rplimportgen.")
|
2018-06-13 18:54:28 +01:00
|
|
|
endif()
|
|
|
|
|
2019-01-18 16:04:32 +00:00
|
|
|
add_subdirectory(cafe)
|
|
|
|
add_subdirectory(libraries)
|
2018-05-23 11:10:10 +01:00
|
|
|
|
2017-03-23 12:17:00 +00:00
|
|
|
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
|
2018-05-22 23:08:13 +01:00
|
|
|
DESTINATION "${CMAKE_INSTALL_PREFIX}/include"
|
|
|
|
FILES_MATCHING PATTERN "*.h*")
|
2017-03-23 12:17:00 +00:00
|
|
|
|
2018-05-22 23:08:13 +01:00
|
|
|
install(DIRECTORY "${CMAKE_SOURCE_DIR}/share/"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_PREFIX}/share")
|