Use unofficial utf8proc package from Vcpkg.
@@ -89,19 +89,8 @@ if(LIBTCOD_UTF8PROC STREQUAL "vendored")
target_include_directories(${PROJECT_NAME} PRIVATE "vendor/utf8proc")
target_sources(${PROJECT_NAME} PRIVATE "vendor/utf8proc/utf8proc.c")
elseif (LIBTCOD_UTF8PROC STREQUAL "vcpkg")
- include(FindPackageHandleStandardArgs)
- include(SelectLibraryConfigurations)
-
- find_path(UTF8PROC_INCLUDE_DIRS utf8proc.h)
- find_library(UTF8PROC_LIBRARY_DEBUG NAMES utf8proc utf8proc_static PATHS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib NO_DEFAULT_PATH Release RelWithDebInfo MinSizeRel)
- find_library(UTF8PROC_LIBRARY_RELEASE NAMES utf8proc utf8proc_static PATHS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib NO_DEFAULT_PATH Debug)
- select_library_configurations(UTF8PROC)
-
- if(NOT BUILD_SHARED_LIBS)
- target_compile_definitions(${PROJECT_NAME} PRIVATE UTF8PROC_STATIC)
- endif()
- target_include_directories(${PROJECT_NAME} PRIVATE ${UTF8PROC_INCLUDE_DIRS})
- target_link_libraries(${PROJECT_NAME} PUBLIC ${UTF8PROC_LIBRARY})
+ find_package(unofficial-utf8proc CONFIG REQUIRED)
+ target_link_libraries(${PROJECT_NAME} PRIVATE utf8proc)
elseif(LIBTCOD_UTF8PROC STREQUAL "disable")
target_compile_definitions(${PROJECT_NAME} PUBLIC TCOD_NO_UTF8)
else()
