Commit 9493f79d authored by Stefan Bodenschatz's avatar Stefan Bodenschatz
Browse files

Fixed magic_get integration.

parent 94e06586
......@@ -13,7 +13,9 @@ include(gsl_interface.cmake)
include(moodycamel_interface.cmake)
include(imgui_interface.cmake)
include(magic_get_interface.cmake)
if(NOT TARGET boost::pfr)
include(magic_get_interface.cmake)
endif()
SET(PHYSFS_ARCHIVE_7Z FALSE CACHE BOOL "" FORCE)
SET(PHYSFS_BUILD_SHARED FALSE CACHE BOOL "" FORCE)
......
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
project(magic_get)
include_guard()
add_library(magic_get INTERFACE)
add_library(boost::magic_get ALIAS magic_get)
target_include_directories(magic_get INTERFACE
add_library(pfr INTERFACE)
add_library(boost::pfr ALIAS pfr)
target_include_directories(pfr INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/magic_get/include>
$<INSTALL_INTERFACE:include>)
......@@ -15,7 +15,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(magic_get INTERFACE -DBOOST_PFR_USE_CPP17=0)
endif()
install(TARGETS magic_get EXPORT magic_get_targets INCLUDES DESTINATION include)
install(TARGETS pfr EXPORT magic_get_targets INCLUDES DESTINATION include)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/magic_get/include/
DESTINATION include
......
......@@ -35,7 +35,7 @@ target_link_libraries(mirrage_net
glm::glm
mirrage::error
enet
boost::magic_get
boost::pfr
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment