wut/CMakeLists.txt

39 lines
1.3 KiB
CMake
Raw Normal View History

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")
2019-01-18 16:04:32 +00:00
project(wut)
option(WUT_BUILD_DOCS "Build documentation" OFF)
2018-05-22 23:08:13 +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")
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.")
endif()
2019-01-18 16:04:32 +00:00
add_subdirectory(cafe)
add_subdirectory(libraries)
2018-05-23 11:10:10 +01:00
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
2018-05-22 23:08:13 +01:00
DESTINATION "${CMAKE_INSTALL_PREFIX}/include"
FILES_MATCHING PATTERN "*.h*")
2018-05-22 23:08:13 +01:00
install(DIRECTORY "${CMAKE_SOURCE_DIR}/share/"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share")