cmake: install files ready for copying in game folder

This commit is contained in:
Anonymous Maarten 2021-01-03 20:38:53 +01:00 committed by shfil
parent 96e2ba19f8
commit 6b8374f391
3 changed files with 7 additions and 31 deletions

View File

@ -21,11 +21,6 @@ if(NOT RE3_AUDIO IN_LIST RE3_AUDIOS)
message(FATAL_ERROR "Illegal RE3_AUDIO=${RE3_AUDIO}") message(FATAL_ERROR "Illegal RE3_AUDIO=${RE3_AUDIO}")
endif() endif()
if(RE3_INSTALL)
include(GNUInstallDirs)
set(RE3_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/re3")
endif()
option(RE3_VENDORED_LIBRW "Use vendored librw" ON) option(RE3_VENDORED_LIBRW "Use vendored librw" ON)
if(RE3_VENDORED_LIBRW) if(RE3_VENDORED_LIBRW)
add_subdirectory(vendor/librw) add_subdirectory(vendor/librw)
@ -35,19 +30,7 @@ endif()
add_subdirectory(src) add_subdirectory(src)
if(RE3_INSTALL) if(RE3_INSTALL)
include(CMakePackageConfigHelpers) install(DIRECTORY gamefiles/ DESTINATION ".")
configure_package_config_file(cmake/re3-config.cmake.in re3-config.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/re3-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
install(
EXPORT re3-targets
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
if(LIBRW_PLATFORM_NULL) if(LIBRW_PLATFORM_NULL)
set(platform "-null") set(platform "-null")
elseif(LIBRW_PLATFORM_PS2) elseif(LIBRW_PLATFORM_PS2)

View File

@ -1,5 +0,0 @@
include("${CMAKE_CURRENT_LIST_DIR}/re3-targets.cmake")
set(RE3_AUDIO "@RE3_AUDIO@")
set(RE3_AUDIOS "@RE3_AUDIOS@")
set(RE3_PLATFORM @LIBRW_PLATFORM@)

View File

@ -107,14 +107,12 @@ set_target_properties(re3
CXX_STANDARD 11 CXX_STANDARD 11
CXX_EXTENSIONS OFF CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON CXX_STANDARD_REQUIRED ON
) )
if(RE3_INSTALL) if(RE3_INSTALL)
install( install(
TARGETS re3 TARGETS re3
EXPORT re3-targets EXPORT re3-targets
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME DESTINATION "."
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
) )
endif() endif()