mirror-chatterino2/cmake/FindSerialize.cmake

14 lines
492 B
CMake
Raw Normal View History

2021-02-12 11:36:42 +01:00
include(FindPackageHandleStandardArgs)
2021-02-13 10:40:27 +01:00
find_path(Serialize_INCLUDE_DIR pajlada/serialize.hpp HINTS ${CMAKE_SOURCE_DIR}/lib/serialize/include)
2021-02-12 11:36:42 +01:00
2021-02-13 10:40:27 +01:00
find_package_handle_standard_args(Serialize DEFAULT_MSG Serialize_INCLUDE_DIR)
2021-02-12 11:36:42 +01:00
if (Serialize_FOUND)
add_library(Serialize::Serialize INTERFACE IMPORTED)
set_target_properties(Serialize::Serialize PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Serialize_INCLUDE_DIR}"
)
endif ()
mark_as_advanced(Serialize_INCLUDE_DIR)