Build configuration overhaul, vcpkg dependency management
This commit is contained in:
parent
50d1a1c275
commit
6932b35c00
|
|
@ -0,0 +1 @@
|
|||
* text=auto
|
||||
|
|
@ -1,10 +1,15 @@
|
|||
Debug/
|
||||
Release/
|
||||
Debug Library/
|
||||
Release Library/
|
||||
x86/
|
||||
x64/
|
||||
/build/
|
||||
/Debug/
|
||||
/Release/
|
||||
/Debug Library/
|
||||
/Release Library/
|
||||
/x86/
|
||||
/x64/
|
||||
.vs/
|
||||
.vscode/
|
||||
.DS_Store
|
||||
*.exe
|
||||
*.zip
|
||||
*.user
|
||||
*.sdf
|
||||
*.pdb
|
||||
|
|
@ -13,9 +18,8 @@ x64/
|
|||
*.suo
|
||||
*.VC.opendb
|
||||
*.VC.db
|
||||
bin/msdf-atlas-gen
|
||||
bin/*.lib
|
||||
/bin/*.lib
|
||||
/bin/msdf-atlas-gen
|
||||
output.png
|
||||
out/
|
||||
build/
|
||||
/cmake-gen.bat
|
||||
|
|
|
|||
18
CHANGELOG.md
18
CHANGELOG.md
|
|
@ -1,4 +1,22 @@
|
|||
|
||||
## Version 1.3 (forthcoming)
|
||||
|
||||
- Updated to MSDFgen 1.10
|
||||
- Switched to vcpkg as the primary dependency management system
|
||||
- Removed Visual Studio solution and Makefile - now has to be generated by CMake
|
||||
- CMake configuration overhaul, added installation configuration
|
||||
- Switched to libpng as the primary PNG file encoder
|
||||
- Fixed a bug that prevented glyph 0 to be specified in a glyphset
|
||||
|
||||
### Version 1.2.2 (2021-09-06)
|
||||
|
||||
- CMake support
|
||||
- Conan package manager support
|
||||
|
||||
### Version 1.2.1 (2021-07-09)
|
||||
|
||||
- Updated to MSDFgen 1.9.1
|
||||
|
||||
## Version 1.2 (2021-05-29)
|
||||
|
||||
- Updated to MSDFgen 1.9.
|
||||
|
|
|
|||
187
CMakeLists.txt
187
CMakeLists.txt
|
|
@ -1,52 +1,135 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(cmake/version.cmake)
|
||||
|
||||
option(MSDF_ATLAS_GEN_BUILD_STANDALONE "Build the msdf-atlas-gen standalone executable" ON)
|
||||
option(MSDF_ATLAS_GEN_MSDFGEN_EXTERNAL "Do not build the msdfgen submodule but find it as an external package" OFF)
|
||||
if(NOT MSDF_ATLAS_GEN_MSDFGEN_EXTERNAL)
|
||||
option(MSDF_ATLAS_BUILD_STANDALONE "Build the msdf-atlas-gen standalone executable" ON)
|
||||
option(MSDF_ATLAS_USE_VCPKG "Use vcpkg package manager to link project dependencies" ON)
|
||||
option(MSDF_ATLAS_USE_SKIA "Build with the Skia library" ON)
|
||||
option(MSDF_ATLAS_MSDFGEN_EXTERNAL "Do not build the msdfgen submodule but find it as an external package" OFF)
|
||||
option(MSDF_ATLAS_INSTALL "Generate installation target" OFF)
|
||||
option(MSDF_ATLAS_DYNAMIC_RUNTIME "Link dynamic runtime library instead of static" OFF)
|
||||
option(BUILD_SHARED_LIBS "Generate dynamic library files instead of static" OFF)
|
||||
|
||||
if(NOT MSDF_ATLAS_MSDFGEN_EXTERNAL)
|
||||
set(MSDFGEN_CORE_ONLY OFF CACHE INTERNAL "Only build the core msdfgen library with no dependencies (disabled for msdf-atlas-gen)" FORCE)
|
||||
set(MSDFGEN_BUILD_STANDALONE OFF CACHE BOOL "Build the msdfgen standalone executable")
|
||||
set(MSDFGEN_USE_OPENMP OFF CACHE INTERNAL "Build with OpenMP support for multithreaded code (disabled for atlas gen)" FORCE)
|
||||
set(MSDFGEN_USE_CPP11 ON CACHE INTERNAL "Build with C++11 enabled (always enabled for atlas gen)" FORCE)
|
||||
set(MSDFGEN_INSTALL OFF CACHE BOOL "Generate installation target for msdfgen")
|
||||
set(MSDFGEN_USE_VCPKG ${MSDF_ATLAS_USE_VCPKG} CACHE INTERNAL "Use vcpkg package manager to link msdfgen project dependencies" FORCE)
|
||||
set(MSDFGEN_USE_OPENMP OFF CACHE INTERNAL "Build with OpenMP support for multithreaded code (disabled for msdf-atlas-gen)" FORCE)
|
||||
set(MSDFGEN_USE_CPP11 ON CACHE INTERNAL "Build with C++11 enabled (always enabled for msdf-atlas-gen)" FORCE)
|
||||
set(MSDFGEN_USE_SKIA ${MSDF_ATLAS_USE_SKIA} CACHE INTERNAL "Build msdfgen with the Skia library" FORCE)
|
||||
set(MSDFGEN_INSTALL ${MSDF_ATLAS_INSTALL} CACHE INTERNAL "Generate installation target for msdfgen" FORCE)
|
||||
set(MSDFGEN_DYNAMIC_RUNTIME ${MSDF_ATLAS_DYNAMIC_RUNTIME} CACHE INTERNAL "Link dynamic runtime library instead of static for msdfgen" FORCE)
|
||||
endif()
|
||||
|
||||
project(msdf-atlas-gen VERSION 1.2 LANGUAGES CXX)
|
||||
get_property(MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(NOT MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release")
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
if(MSDF_ATLAS_DYNAMIC_RUNTIME)
|
||||
set(MSDF_ATLAS_MSVC_RUNTIME "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
else()
|
||||
set(MSDF_ATLAS_MSVC_RUNTIME "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
if(MSDF_ATLAS_GEN_MSDFGEN_EXTERNAL)
|
||||
find_package(msdfgen REQUIRED)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif()
|
||||
|
||||
if(MSDF_ATLAS_USE_VCPKG)
|
||||
# Make sure that vcpkg toolchain file is set
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE)
|
||||
if(DEFINED ENV{VCPKG_ROOT})
|
||||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
|
||||
else()
|
||||
message(SEND_ERROR "Vcpkg toolchain not configured. Either set VCPKG_ROOT environment variable or pass -DCMAKE_TOOLCHAIN_FILE=VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake to cmake")
|
||||
endif()
|
||||
endif()
|
||||
# Default to statically linked vcpkg triplet on Windows
|
||||
if(WIN32 AND NOT VCPKG_TARGET_TRIPLET AND NOT MSDF_ATLAS_DYNAMIC_RUNTIME)
|
||||
if(CMAKE_GENERATOR_PLATFORM MATCHES "64$" AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
|
||||
set(VCPKG_TARGET_TRIPLET "x64-windows-static")
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "32$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x86")
|
||||
set(VCPKG_TARGET_TRIPLET "x86-windows-static")
|
||||
else()
|
||||
if(CMAKE_GENERATOR_PLATFORM)
|
||||
message(WARNING "Vcpkg triplet not explicitly specified and could not be deduced. Recommend using -DVCPKG_TARGET_TRIPLET=x64-windows-static or similar")
|
||||
else()
|
||||
message(WARNING "Vcpkg triplet not explicitly specified and could not be deduced. Recommend using -A to explicitly select platform (Win32 or x64)")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
# Select project features
|
||||
if(NOT MSDF_ATLAS_VCPKG_FEATURES_SET)
|
||||
set(VCPKG_MANIFEST_NO_DEFAULT_FEATURES ON)
|
||||
if(MSDF_ATLAS_USE_SKIA)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "geometry-preprocessing")
|
||||
endif()
|
||||
endif()
|
||||
set(MSDFGEN_VCPKG_FEATURES_SET ON)
|
||||
endif()
|
||||
|
||||
# Version is specified in vcpkg.json
|
||||
project(msdf-atlas-gen VERSION ${MSDF_ATLAS_VERSION} LANGUAGES CXX)
|
||||
|
||||
if(MSDF_ATLAS_MSDFGEN_EXTERNAL)
|
||||
if(NOT TARGET msdfgen::msdfgen)
|
||||
find_package(msdfgen REQUIRED)
|
||||
endif()
|
||||
else()
|
||||
add_subdirectory(msdfgen)
|
||||
endif()
|
||||
find_package(Threads REQUIRED)
|
||||
if(NOT TARGET PNG::PNG)
|
||||
find_package(PNG REQUIRED)
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE MSDF_ATLAS_GEN_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "msdf-atlas-gen/*.h" "msdf-atlas-gen/*.hpp")
|
||||
file(GLOB_RECURSE MSDF_ATLAS_GEN_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "msdf-atlas-gen/*.cpp")
|
||||
file(GLOB_RECURSE MSDF_ATLAS_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "msdf-atlas-gen/*.h" "msdf-atlas-gen/*.hpp")
|
||||
file(GLOB_RECURSE MSDF_ATLAS_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "msdf-atlas-gen/*.cpp")
|
||||
|
||||
# msdf-atlas-gen library
|
||||
add_library(msdf-atlas-gen ${MSDF_ATLAS_GEN_HEADERS} ${MSDF_ATLAS_GEN_SOURCES})
|
||||
add_library(msdf-atlas-gen ${MSDF_ATLAS_HEADERS} ${MSDF_ATLAS_SOURCES})
|
||||
add_library(msdf-atlas-gen::msdf-atlas-gen ALIAS msdf-atlas-gen)
|
||||
set_target_properties(msdf-atlas-gen PROPERTIES PUBLIC_HEADER "${MSDF_ATLAS_GEN_HEADERS}")
|
||||
set_target_properties(msdf-atlas-gen PROPERTIES PUBLIC_HEADER "${MSDF_ATLAS_HEADERS}")
|
||||
set_property(TARGET msdf-atlas-gen PROPERTY MSVC_RUNTIME_LIBRARY "${MSDF_ATLAS_MSVC_RUNTIME}")
|
||||
target_compile_definitions(msdf-atlas-gen PUBLIC
|
||||
MSDF_ATLAS_VERSION=${MSDF_ATLAS_VERSION}
|
||||
MSDF_ATLAS_VERSION_MAJOR=${MSDF_ATLAS_VERSION_MAJOR}
|
||||
MSDF_ATLAS_VERSION_MINOR=${MSDF_ATLAS_VERSION_MINOR}
|
||||
MSDF_ATLAS_VERSION_REVISION=${MSDF_ATLAS_VERSION_REVISION}
|
||||
MSDF_ATLAS_COPYRIGHT_YEAR=${MSDF_ATLAS_COPYRIGHT_YEAR}
|
||||
)
|
||||
target_include_directories(msdf-atlas-gen
|
||||
INTERFACE
|
||||
$<INSTALL_INTERFACE:include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format
|
||||
)
|
||||
|
||||
target_compile_features(msdf-atlas-gen PUBLIC cxx_std_11)
|
||||
target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen)
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT msdf-atlas-gen)
|
||||
|
||||
target_compile_features(msdf-atlas-gen PUBLIC cxx_std_11)
|
||||
target_link_libraries(msdf-atlas-gen PRIVATE Threads::Threads PNG::PNG)
|
||||
target_link_libraries(msdf-atlas-gen PUBLIC msdfgen::msdfgen)
|
||||
|
||||
if(BUILD_SHARED_LIBS AND WIN32)
|
||||
target_compile_definitions(msdf-atlas-gen PRIVATE "MSDF_ATLAS_PUBLIC=__declspec(dllexport)")
|
||||
target_compile_definitions(msdf-atlas-gen INTERFACE "MSDF_ATLAS_PUBLIC=__declspec(dllimport)")
|
||||
else()
|
||||
target_compile_definitions(msdf-atlas-gen PUBLIC MSDF_ATLAS_PUBLIC=)
|
||||
endif()
|
||||
|
||||
# msdf-atlas-gen standalone executable
|
||||
if(MSDF_ATLAS_GEN_BUILD_STANDALONE)
|
||||
set(MSDF_ATLAS_GEN_STANDALONE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/msdf-atlas-gen/main.cpp")
|
||||
if(MSDF_ATLAS_BUILD_STANDALONE)
|
||||
set(MSDF_ATLAS_STANDALONE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/msdf-atlas-gen/main.cpp")
|
||||
if(MSVC)
|
||||
set(MSDF_ATLAS_GEN_STANDALONE_SOURCES ${MSDF_ATLAS_GEN_STANDALONE_SOURCES} "${CMAKE_CURRENT_SOURCE_DIR}/msdf-atlas-gen.rc")
|
||||
set(MSDF_ATLAS_STANDALONE_SOURCES ${MSDF_ATLAS_STANDALONE_SOURCES} "${CMAKE_CURRENT_SOURCE_DIR}/msdf-atlas-gen.rc")
|
||||
endif()
|
||||
add_executable(msdf-atlas-gen-standalone ${MSDF_ATLAS_GEN_STANDALONE_SOURCES})
|
||||
add_executable(msdf-atlas-gen-standalone ${MSDF_ATLAS_STANDALONE_SOURCES})
|
||||
target_compile_definitions(msdf-atlas-gen-standalone PUBLIC MSDF_ATLAS_STANDALONE)
|
||||
target_compile_definitions(msdf-atlas-gen-standalone PRIVATE MSDF_ATLAS_VERSION_UNDERLINE=${MSDF_ATLAS_VERSION_UNDERLINE})
|
||||
set_property(TARGET msdf-atlas-gen-standalone PROPERTY MSVC_RUNTIME_LIBRARY "${MSDF_ATLAS_MSVC_RUNTIME}")
|
||||
set_target_properties(msdf-atlas-gen-standalone PROPERTIES
|
||||
OUTPUT_NAME msdf-atlas-gen
|
||||
ARCHIVE_OUTPUT_NAME msdf-atlas-gen-standalone
|
||||
|
|
@ -54,6 +137,64 @@ if(MSDF_ATLAS_GEN_BUILD_STANDALONE)
|
|||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
)
|
||||
target_link_libraries(msdf-atlas-gen-standalone PUBLIC msdf-atlas-gen::msdf-atlas-gen)
|
||||
target_link_libraries(msdf-atlas-gen-standalone PRIVATE msdf-atlas-gen::msdf-atlas-gen)
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT msdf-atlas-gen-standalone)
|
||||
endif()
|
||||
|
||||
# Installation
|
||||
if(MSDF_ATLAS_INSTALL)
|
||||
include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
set(MSDF_ATLAS_CONFIG_PATH "lib/cmake/msdf-atlas-gen")
|
||||
|
||||
# install tree package config
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/msdf-atlas-gen-config-version.cmake"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
configure_package_config_file(
|
||||
cmake/msdf-atlas-gen-config.cmake.in
|
||||
${MSDF_ATLAS_CONFIG_PATH}/msdf-atlas-gen-config.cmake
|
||||
INSTALL_DESTINATION ${MSDF_ATLAS_CONFIG_PATH}
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
)
|
||||
|
||||
# build tree package config
|
||||
configure_file(
|
||||
cmake/msdf-atlas-gen-config.cmake.in
|
||||
msdf-atlas-gen-config.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
install(TARGETS msdf-atlas-gen EXPORT msdf-atlas-gen-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/msdf-atlas-gen
|
||||
)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
install(FILES $<TARGET_PDB_FILE:msdf-atlas-gen> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||
endif()
|
||||
|
||||
export(EXPORT msdf-atlas-gen-targets NAMESPACE msdf-atlas-gen:: FILE "${CMAKE_CURRENT_BINARY_DIR}/msdf-atlas-gen-targets.cmake")
|
||||
install(EXPORT msdf-atlas-gen-targets FILE msdf-atlas-gen-targets.cmake NAMESPACE msdf-atlas-gen:: DESTINATION ${MSDF_ATLAS_CONFIG_PATH})
|
||||
|
||||
if(MSDF_ATLAS_BUILD_STANDALONE)
|
||||
install(TARGETS msdf-atlas-gen-standalone EXPORT msdf-atlas-gen-binary-targets DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(MSVC)
|
||||
install(FILES $<TARGET_PDB_FILE:msdf-atlas-gen-standalone> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||
endif()
|
||||
export(EXPORT msdf-atlas-gen-binary-targets NAMESPACE msdf-atlas-gen-standalone:: FILE "${CMAKE_CURRENT_BINARY_DIR}/msdf-atlas-gen-binary-targets.cmake")
|
||||
install(EXPORT msdf-atlas-gen-binary-targets FILE msdf-atlas-gen-binary-targets.cmake NAMESPACE msdf-atlas-gen-standalone:: DESTINATION ${MSDF_ATLAS_CONFIG_PATH})
|
||||
endif()
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${MSDF_ATLAS_CONFIG_PATH}/msdf-atlas-gen-config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/msdf-atlas-gen-config-version.cmake"
|
||||
DESTINATION ${MSDF_ATLAS_CONFIG_PATH}
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 Viktor Chlumsky
|
||||
Copyright (c) 2020 - 2023 Viktor Chlumsky
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
all:
|
||||
mkdir -p bin
|
||||
g++ -I /usr/local/include/freetype2 -I /usr/include/freetype2 -I artery-font-format -I msdfgen/include -I msdfgen -D MSDFGEN_USE_CPP11 -D MSDF_ATLAS_STANDALONE -std=c++11 -pthread -O2 -o bin/msdf-atlas-gen msdfgen/core/*.cpp msdfgen/lib/*.cpp msdfgen/ext/*.cpp msdf-atlas-gen/*.cpp -lfreetype
|
||||
|
|
@ -33,8 +33,11 @@ Notes:
|
|||
## Getting started
|
||||
|
||||
This project can be used either as a library or as a standalone console program.
|
||||
Examples of how to use it as a library are available at the [bottom of the page](#library-usage-examples).
|
||||
To start using the program immediately, there is a Windows binary available for download in the ["Releases" section](https://github.com/Chlumsky/msdf-atlas-gen/releases).
|
||||
To build the project, you may use the included [Visual Studio solution](msdf-atlas-gen.sln) or the [CMake script](CMakeLists.txt). Examples of how to use it as a library are available [at the bottom](#library-usage-examples).
|
||||
To build the project from source, you may use the included [CMake script](CMakeLists.txt).
|
||||
In its default configuration, it requires [vcpkg](https://vcpkg.io/) as the provider for third-party library dependencies.
|
||||
If you set the environment variable `VCPKG_ROOT` to the vcpkg directory, the CMake configuration will take care of fetching all required packages from vcpkg.
|
||||
|
||||
## Command line arguments
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 00ac3d8f964ec00a836c2bb5aeb126235ac98234
|
||||
Subproject commit a3dcadb9df2b5d45db2691ceea84318c711cb3e1
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
set(MSDF_ATLAS_STANDALONE_AVAILABLE @MSDF_ATLAS_BUILD_STANDALONE@)
|
||||
|
||||
find_dependency(PNG REQUIRED)
|
||||
find_dependency(msdfgen REQUIRED)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/msdf-atlas-gen-targets.cmake")
|
||||
|
||||
if(MSDF_ATLAS_STANDALONE_AVAILABLE)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/msdf-atlas-gen-binary-targets.cmake")
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.18.0")
|
||||
set_target_properties(msdf-atlas-gen-standalone::msdf-atlas-gen-standalone PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
endif()
|
||||
add_executable(msdf-atlas-gen::msdf-atlas-gen-run ALIAS msdf-atlas-gen-standalone::msdf-atlas-gen-standalone)
|
||||
set(MSDF_ATLAS_GEN_EXECUTABLE "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/msdf-atlas-gen@CMAKE_EXECUTABLE_SUFFIX@")
|
||||
endif()
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
# This script reads version from vcpkg.json and sets it to ${MSDF_ATLAS_VERSION} etc.
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../vcpkg.json" MSDF_ATLAS_VCPKG_JSON)
|
||||
|
||||
string(REGEX MATCH "\"version\"[ \t\n\r]*:[ \t\n\r]*\"[^\"]*\"" MSDF_ATLAS_TMP_VERSION_PAIR ${MSDF_ATLAS_VCPKG_JSON})
|
||||
string(REGEX REPLACE "\"version\"[ \t\n\r]*:[ \t\n\r]*\"([^\"]*)\"" "\\1" MSDF_ATLAS_VERSION ${MSDF_ATLAS_TMP_VERSION_PAIR})
|
||||
string(REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)" "\\1" MSDF_ATLAS_VERSION_MAJOR ${MSDF_ATLAS_VERSION})
|
||||
string(REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)" "\\2" MSDF_ATLAS_VERSION_MINOR ${MSDF_ATLAS_VERSION})
|
||||
string(REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)" "\\3" MSDF_ATLAS_VERSION_REVISION ${MSDF_ATLAS_VERSION})
|
||||
string(LENGTH ${MSDF_ATLAS_VERSION} MSDF_ATLAS_VERSION_LENGTH)
|
||||
string(REPEAT "-" ${MSDF_ATLAS_VERSION_LENGTH} MSDF_ATLAS_VERSION_UNDERLINE)
|
||||
string(TIMESTAMP MSDF_ATLAS_COPYRIGHT_YEAR "%Y")
|
||||
|
||||
unset(MSDF_ATLAS_TMP_VERSION_PAIR)
|
||||
unset(MSDF_ATLAS_VERSION_LENGTH)
|
||||
unset(MSDF_ATLAS_VCPKG_JSON)
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,61 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msdfgen", "msdfgen\msdfgen.vcxproj", "{84BE2D91-F071-4151-BE12-61460464C494}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msdf-atlas-gen", "msdf-atlas-gen.vcxproj", "{223EDB94-5B35-45F2-A584-273DE6E45F6F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{84BE2D91-F071-4151-BE12-61460464C494} = {84BE2D91-F071-4151-BE12-61460464C494}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug Library|x64 = Debug Library|x64
|
||||
Debug Library|x86 = Debug Library|x86
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release Library|x64 = Release Library|x64
|
||||
Release Library|x86 = Release Library|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug Library|x64.ActiveCfg = Debug Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug Library|x64.Build.0 = Debug Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug Library|x86.ActiveCfg = Debug Library|Win32
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug Library|x86.Build.0 = Debug Library|Win32
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug|x64.ActiveCfg = Debug Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug|x64.Build.0 = Debug Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug|x86.ActiveCfg = Debug Library|Win32
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Debug|x86.Build.0 = Debug Library|Win32
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release Library|x64.ActiveCfg = Release Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release Library|x64.Build.0 = Release Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release Library|x86.ActiveCfg = Release Library|Win32
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release Library|x86.Build.0 = Release Library|Win32
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release|x64.ActiveCfg = Release Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release|x64.Build.0 = Release Library|x64
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release|x86.ActiveCfg = Release Library|Win32
|
||||
{84BE2D91-F071-4151-BE12-61460464C494}.Release|x86.Build.0 = Release Library|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug Library|x64.ActiveCfg = Debug Library|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug Library|x64.Build.0 = Debug Library|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug Library|x86.ActiveCfg = Debug Library|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug Library|x86.Build.0 = Debug Library|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug|x64.Build.0 = Debug|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Debug|x86.Build.0 = Debug|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release Library|x64.ActiveCfg = Release Library|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release Library|x64.Build.0 = Release Library|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release Library|x86.ActiveCfg = Release Library|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release Library|x86.Build.0 = Release Library|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release|x64.ActiveCfg = Release|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release|x64.Build.0 = Release|x64
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release|x86.ActiveCfg = Release|Win32
|
||||
{223EDB94-5B35-45F2-A584-273DE6E45F6F}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -1,374 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug Library|Win32">
|
||||
<Configuration>Debug Library</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug Library|x64">
|
||||
<Configuration>Debug Library</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release Library|Win32">
|
||||
<Configuration>Release Library</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release Library|x64">
|
||||
<Configuration>Release Library</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{223EDB94-5B35-45F2-A584-273DE6E45F6F}</ProjectGuid>
|
||||
<RootNamespace>msdfatlasgen</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>bin\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>bin\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'">
|
||||
<TargetName>msdf-atlas-gen</TargetName>
|
||||
<OutDir>$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;MSDF_ATLAS_STANDALONE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;skia.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\$(Configuration);msdfgen\$(Configuration) Library;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\msdfgen\freetype\win32;$(SolutionDir)$(Configuration) Library;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\debug;msdfgen\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;MSDF_ATLAS_STANDALONE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;skia.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\$(Configuration);msdfgen\$(Platform)\$(Configuration) Library;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\msdfgen\freetype\win64;$(SolutionDir)$(Platform)\$(Configuration) Library;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\debug;msdfgen\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;MSDF_ATLAS_STANDALONE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;skia.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\$(Configuration);msdfgen\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\msdfgen\freetype\win32;$(SolutionDir)bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\release;msdfgen\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;MSDF_ATLAS_STANDALONE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;skia.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\$(Configuration);msdfgen\$(Platform)\$(Configuration) Library;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>msdfgen\include;msdfgen\freetype\include;msdfgen;artery-font-format;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MSDFGEN_USE_CPP11;MSDFGEN_USE_SKIA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>freetype.lib;msdfgen.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\msdfgen\freetype\win64;$(SolutionDir)$(Platform)\$(Configuration) Library;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalLibraryDirectories>msdfgen\freetype\win$(PlatformArchitecture);msdfgen\skia\win$(PlatformArchitecture)\release;msdfgen\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="msdf-atlas-gen\artery-font-export.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\bitmap-blit.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\charset-parser.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\Charset.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\csv-export.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\FontGeometry.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\glyph-generators.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\GlyphGeometry.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\image-encode.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\json-export.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\main.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\RectanglePacker.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\shadron-preview-generator.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\size-selectors.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\TightAtlasPacker.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\utf8.cpp" />
|
||||
<ClCompile Include="msdf-atlas-gen\Workload.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\artery-font-export.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\AtlasGenerator.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\AtlasStorage.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\bitmap-blit.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\BitmapAtlasStorage.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\BitmapAtlasStorage.hpp" />
|
||||
<ClInclude Include="msdf-atlas-gen\csv-export.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\DynamicAtlas.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\DynamicAtlas.hpp" />
|
||||
<ClInclude Include="msdf-atlas-gen\FontGeometry.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\glyph-generators.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\image-encode.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\Charset.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\GlyphGeometry.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\image-save.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\image-save.hpp" />
|
||||
<ClInclude Include="msdf-atlas-gen\ImmediateAtlasGenerator.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\ImmediateAtlasGenerator.hpp" />
|
||||
<ClInclude Include="msdf-atlas-gen\json-export.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\msdf-atlas-gen.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\rectangle-packing.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\rectangle-packing.hpp" />
|
||||
<ClInclude Include="msdf-atlas-gen\Rectangle.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\RectanglePacker.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\Remap.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\shadron-preview-generator.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\size-selectors.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\GlyphBox.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\types.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\utf8.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\Workload.h" />
|
||||
<ClInclude Include="msdf-atlas-gen\TightAtlasPacker.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="msdf-atlas-gen.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Template Source Files">
|
||||
<UniqueIdentifier>{ee785f45-c1cf-48ae-b864-f27237b077c1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="msdf-atlas-gen\artery-font-export.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\bitmap-blit.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\csv-export.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\glyph-generators.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\GlyphGeometry.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\Charset.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\charset-parser.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\image-encode.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\json-export.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\RectanglePacker.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\shadron-preview-generator.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\size-selectors.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\TightAtlasPacker.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\utf8.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\Workload.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="msdf-atlas-gen\FontGeometry.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\artery-font-export.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\AtlasGenerator.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\AtlasStorage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\BitmapAtlasStorage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\BitmapAtlasStorage.hpp">
|
||||
<Filter>Template Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\bitmap-blit.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\csv-export.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\DynamicAtlas.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\DynamicAtlas.hpp">
|
||||
<Filter>Template Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\GlyphBox.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\glyph-generators.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\GlyphGeometry.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\Charset.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\image-encode.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\image-save.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\image-save.hpp">
|
||||
<Filter>Template Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\ImmediateAtlasGenerator.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\ImmediateAtlasGenerator.hpp">
|
||||
<Filter>Template Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\json-export.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\msdf-atlas-gen.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\Rectangle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\RectanglePacker.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\rectangle-packing.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\rectangle-packing.hpp">
|
||||
<Filter>Template Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\Remap.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\shadron-preview-generator.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\size-selectors.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\TightAtlasPacker.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\utf8.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\Workload.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="msdf-atlas-gen\FontGeometry.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="msdf-atlas-gen.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="icon.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -12,7 +12,7 @@ class Charset {
|
|||
|
||||
public:
|
||||
/// The set of the 95 printable ASCII characters
|
||||
static const Charset ASCII;
|
||||
static MSDF_ATLAS_PUBLIC const Charset ASCII;
|
||||
|
||||
/// Adds a codepoint
|
||||
void add(unicode_t cp);
|
||||
|
|
|
|||
|
|
@ -58,11 +58,12 @@ bool exportArteryFont(const FontGeometry *fonts, int fontCount, const msdfgen::B
|
|||
artery_font::StdArteryFont<REAL> arfont = { };
|
||||
arfont.metadataFormat = artery_font::METADATA_NONE;
|
||||
|
||||
arfont.variants = artery_font::StdList<typename artery_font::StdArteryFont<REAL>::Variant>(fontCount);
|
||||
for (int i = 0; i < fontCount; ++i) {
|
||||
const FontGeometry &font = fonts[i];
|
||||
GlyphIdentifierType identifierType = font.getPreferredIdentifierType();
|
||||
const msdfgen::FontMetrics &fontMetrics = font.getMetrics();
|
||||
artery_font::StdFontVariant<REAL> fontVariant = { };
|
||||
typename artery_font::StdArteryFont<REAL>::Variant &fontVariant = arfont.variants[i] = typename artery_font::StdArteryFont<REAL>::Variant();
|
||||
fontVariant.codepointType = convertCodepointType(identifierType);
|
||||
fontVariant.imageType = convertImageType(properties.imageType);
|
||||
fontVariant.metrics.fontSize = REAL(properties.fontSize*fontMetrics.emSize);
|
||||
|
|
@ -76,7 +77,7 @@ bool exportArteryFont(const FontGeometry *fonts, int fontCount, const msdfgen::B
|
|||
fontVariant.metrics.underlineThickness = REAL(fontMetrics.underlineThickness);
|
||||
const char *name = font.getName();
|
||||
if (name)
|
||||
fontVariant.name.string = name;
|
||||
(std::string &) fontVariant.name = name;
|
||||
fontVariant.glyphs = artery_font::StdList<artery_font::Glyph<REAL> >(font.getGlyphs().size());
|
||||
int j = 0;
|
||||
for (const GlyphGeometry &glyphGeom : font.getGlyphs()) {
|
||||
|
|
@ -104,7 +105,7 @@ bool exportArteryFont(const FontGeometry *fonts, int fontCount, const msdfgen::B
|
|||
kernPair.codepoint1 = elem.first.first;
|
||||
kernPair.codepoint2 = elem.first.second;
|
||||
kernPair.advance.h = REAL(elem.second);
|
||||
fontVariant.kernPairs.vector.push_back((artery_font::KernPair<REAL> &&) kernPair);
|
||||
((std::vector<artery_font::KernPair<REAL> > &) fontVariant.kernPairs).push_back((artery_font::KernPair<REAL> &&) kernPair);
|
||||
}
|
||||
break;
|
||||
case GlyphIdentifierType::UNICODE_CODEPOINT:
|
||||
|
|
@ -116,16 +117,16 @@ bool exportArteryFont(const FontGeometry *fonts, int fontCount, const msdfgen::B
|
|||
kernPair.codepoint1 = glyph1->getCodepoint();
|
||||
kernPair.codepoint2 = glyph2->getCodepoint();
|
||||
kernPair.advance.h = REAL(elem.second);
|
||||
fontVariant.kernPairs.vector.push_back((artery_font::KernPair<REAL> &&) kernPair);
|
||||
((std::vector<artery_font::KernPair<REAL> > &) fontVariant.kernPairs).push_back((artery_font::KernPair<REAL> &&) kernPair);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
arfont.variants.vector.push_back((artery_font::StdFontVariant<REAL> &&) fontVariant);
|
||||
}
|
||||
|
||||
arfont.images = artery_font::StdList<typename artery_font::StdArteryFont<REAL>::Image>(1);
|
||||
{
|
||||
artery_font::StdImage image = { };
|
||||
typename artery_font::StdArteryFont<REAL>::Image &image = arfont.images[0] = typename artery_font::StdArteryFont<REAL>::Image();
|
||||
image.width = atlas.width;
|
||||
image.height = atlas.height;
|
||||
image.channels = N;
|
||||
|
|
@ -134,13 +135,13 @@ bool exportArteryFont(const FontGeometry *fonts, int fontCount, const msdfgen::B
|
|||
case ImageFormat::PNG:
|
||||
image.encoding = artery_font::IMAGE_PNG;
|
||||
image.pixelFormat = artery_font::PIXEL_UNSIGNED8;
|
||||
if (!encodePng(image.data.vector, atlas))
|
||||
if (!encodePng((std::vector<byte> &) image.data, atlas))
|
||||
return false;
|
||||
break;
|
||||
case ImageFormat::TIFF:
|
||||
image.encoding = artery_font::IMAGE_TIFF;
|
||||
image.pixelFormat = artery_font::PIXEL_FLOAT32;
|
||||
if (!encodeTiff(image.data.vector, atlas))
|
||||
if (!encodeTiff((std::vector<byte> &) image.data, atlas))
|
||||
return false;
|
||||
break;
|
||||
case ImageFormat::BINARY:
|
||||
|
|
@ -174,7 +175,6 @@ bool exportArteryFont(const FontGeometry *fonts, int fontCount, const msdfgen::B
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
arfont.images.vector.push_back((artery_font::StdImage &&) image);
|
||||
}
|
||||
|
||||
return artery_font::writeFile(arfont, filename);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,98 @@
|
|||
|
||||
#include "image-encode.h"
|
||||
|
||||
#include <core/pixel-conversion.hpp>
|
||||
|
||||
#ifdef MSDFGEN_USE_LIBPNG
|
||||
|
||||
#include <png.h>
|
||||
|
||||
namespace msdf_atlas {
|
||||
|
||||
class PngGuard {
|
||||
png_structp png;
|
||||
png_infop info;
|
||||
|
||||
public:
|
||||
inline PngGuard(png_structp png, png_infop info) : png(png), info(info) { }
|
||||
inline ~PngGuard() {
|
||||
png_destroy_write_struct(&png, &info);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
static void pngIgnoreError(png_structp, png_const_charp) { }
|
||||
|
||||
static void pngWrite(png_structp png, png_bytep data, png_size_t length) {
|
||||
std::vector<byte> &output = *reinterpret_cast<std::vector<byte> *>(png_get_io_ptr(png));
|
||||
output.insert(output.end(), data, data+length);
|
||||
}
|
||||
|
||||
static void pngFlush(png_structp) { }
|
||||
|
||||
static bool pngEncode(std::vector<byte> &output, const byte *pixels, int width, int height, int channels, int colorType) {
|
||||
if (!(pixels && width && height))
|
||||
return false;
|
||||
png_structp png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, &pngIgnoreError, &pngIgnoreError);
|
||||
if (!png)
|
||||
return false;
|
||||
png_infop info = png_create_info_struct(png);
|
||||
PngGuard guard(png, info);
|
||||
if (!info)
|
||||
return false;
|
||||
std::vector<const byte *> rows(height);
|
||||
for (int y = 0; y < height; ++y)
|
||||
rows[y] = pixels+channels*width*(height-y-1);
|
||||
if (setjmp(png_jmpbuf(png)))
|
||||
return false;
|
||||
png_set_write_fn(png, &output, &pngWrite, &pngFlush);
|
||||
png_set_IHDR(png, info, width, height, 8, colorType, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
|
||||
png_set_compression_level(png, 9);
|
||||
png_set_rows(png, info, const_cast<png_bytepp>(&rows[0]));
|
||||
png_write_png(png, info, PNG_TRANSFORM_IDENTITY, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool pngEncode(std::vector<byte> &output, const float *pixels, int width, int height, int channels, int colorType) {
|
||||
if (!(pixels && width && height))
|
||||
return false;
|
||||
int subpixels = channels*width*height;
|
||||
std::vector<byte> bytePixels(subpixels);
|
||||
for (int i = 0; i < subpixels; ++i)
|
||||
bytePixels[i] = msdfgen::pixelFloatToByte(pixels[i]);
|
||||
return pngEncode(output, bytePixels.data(), width, height, channels, colorType);
|
||||
}
|
||||
|
||||
bool encodePng(std::vector<byte> &output, const msdfgen::BitmapConstRef<msdfgen::byte, 1> &bitmap) {
|
||||
return pngEncode(output, bitmap.pixels, bitmap.width, bitmap.height, 1, PNG_COLOR_TYPE_GRAY);
|
||||
}
|
||||
|
||||
bool encodePng(std::vector<byte> &output, const msdfgen::BitmapConstRef<msdfgen::byte, 3> &bitmap) {
|
||||
return pngEncode(output, bitmap.pixels, bitmap.width, bitmap.height, 3, PNG_COLOR_TYPE_RGB);
|
||||
}
|
||||
|
||||
bool encodePng(std::vector<byte> &output, const msdfgen::BitmapConstRef<msdfgen::byte, 4> &bitmap) {
|
||||
return pngEncode(output, bitmap.pixels, bitmap.width, bitmap.height, 4, PNG_COLOR_TYPE_RGB_ALPHA);
|
||||
}
|
||||
|
||||
bool encodePng(std::vector<byte> &output, const msdfgen::BitmapConstRef<float, 1> &bitmap) {
|
||||
return pngEncode(output, bitmap.pixels, bitmap.width, bitmap.height, 1, PNG_COLOR_TYPE_GRAY);
|
||||
}
|
||||
|
||||
bool encodePng(std::vector<byte> &output, const msdfgen::BitmapConstRef<float, 3> &bitmap) {
|
||||
return pngEncode(output, bitmap.pixels, bitmap.width, bitmap.height, 3, PNG_COLOR_TYPE_RGB);
|
||||
}
|
||||
|
||||
bool encodePng(std::vector<byte> &output, const msdfgen::BitmapConstRef<float, 4> &bitmap) {
|
||||
return pngEncode(output, bitmap.pixels, bitmap.width, bitmap.height, 4, PNG_COLOR_TYPE_RGB_ALPHA);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MSDFGEN_USE_LODEPNG
|
||||
|
||||
#include <lodepng.h>
|
||||
|
||||
namespace msdf_atlas {
|
||||
|
|
@ -61,3 +153,5 @@ bool encodePng(std::vector<byte> &output, const msdfgen::BitmapConstRef<float, 4
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
/*
|
||||
* MULTI-CHANNEL SIGNED DISTANCE FIELD ATLAS GENERATOR v1.2 (2021-05-29) - standalone console program
|
||||
* --------------------------------------------------------------------------------------------------
|
||||
* A utility by Viktor Chlumsky, (c) 2020 - 2021
|
||||
*
|
||||
* MULTI-CHANNEL SIGNED DISTANCE FIELD ATLAS GENERATOR - standalone console program
|
||||
* --------------------------------------------------------------------------------
|
||||
* A utility by Viktor Chlumsky, (c) 2020 - 2023
|
||||
*/
|
||||
|
||||
#ifdef MSDF_ATLAS_STANDALONE
|
||||
|
|
@ -29,6 +28,16 @@ using namespace msdf_atlas;
|
|||
#define LCG_MULTIPLIER 6364136223846793005ull
|
||||
#define LCG_INCREMENT 1442695040888963407ull
|
||||
|
||||
#define STRINGIZE_(x) #x
|
||||
#define STRINGIZE(x) STRINGIZE_(x)
|
||||
#define MSDF_ATLAS_VERSION_STRING STRINGIZE(MSDF_ATLAS_VERSION)
|
||||
#define MSDFGEN_VERSION_STRING STRINGIZE(MSDFGEN_VERSION)
|
||||
#ifdef MSDF_ATLAS_VERSION_UNDERLINE
|
||||
#define VERSION_UNDERLINE STRINGIZE(MSDF_ATLAS_VERSION_UNDERLINE)
|
||||
#else
|
||||
#define VERSION_UNDERLINE "--------"
|
||||
#endif
|
||||
|
||||
#ifdef MSDFGEN_USE_SKIA
|
||||
#define TITLE_SUFFIX " & Skia"
|
||||
#define EXTRA_UNDERLINE "-------"
|
||||
|
|
@ -38,8 +47,8 @@ using namespace msdf_atlas;
|
|||
#endif
|
||||
|
||||
static const char * const helpText = R"(
|
||||
MSDF Atlas Generator by Viktor Chlumsky v)" MSDF_ATLAS_VERSION R"( (with MSDFGEN v)" MSDFGEN_VERSION TITLE_SUFFIX R"()
|
||||
----------------------------------------------------------------)" EXTRA_UNDERLINE R"(
|
||||
MSDF Atlas Generator by Viktor Chlumsky v)" MSDF_ATLAS_VERSION_STRING R"( (with MSDFgen v)" MSDFGEN_VERSION_STRING TITLE_SUFFIX R"()
|
||||
----------------------------------------------------------------)" VERSION_UNDERLINE EXTRA_UNDERLINE R"(
|
||||
|
||||
INPUT SPECIFICATION
|
||||
-font <filename.ttf/otf>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,10 @@
|
|||
#pragma once
|
||||
|
||||
/*
|
||||
* MULTI-CHANNEL SIGNED DISTANCE FIELD ATLAS GENERATOR v1.2 (2021-05-29)
|
||||
* ---------------------------------------------------------------------
|
||||
* A utility by Viktor Chlumsky, (c) 2020 - 2021
|
||||
*
|
||||
* Generates compact bitmap font atlases using MSDFGEN.
|
||||
*
|
||||
* MULTI-CHANNEL SIGNED DISTANCE FIELD ATLAS GENERATOR
|
||||
* ---------------------------------------------------
|
||||
* A utility by Viktor Chlumsky, (c) 2020 - 2023
|
||||
* Generates compact bitmap font atlases using MSDFgen
|
||||
*/
|
||||
|
||||
#include <msdfgen.h>
|
||||
|
|
@ -38,5 +36,3 @@
|
|||
#include "csv-export.h"
|
||||
#include "json-export.h"
|
||||
#include "shadron-preview-generator.h"
|
||||
|
||||
#define MSDF_ATLAS_VERSION "1.2"
|
||||
|
|
|
|||
2
msdfgen
2
msdfgen
|
|
@ -1 +1 @@
|
|||
Subproject commit 4e8ff2321ea9696801675c908a4822c4d8e71eb8
|
||||
Subproject commit a811ef8935354d3f6d767cff6c4eebeb683777f2
|
||||
BIN
resource.h
BIN
resource.h
Binary file not shown.
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
||||
"name": "msdf-atlas-gen",
|
||||
"version": "1.3.0",
|
||||
"description": "Multi-channel signed distance field atlas generator",
|
||||
"homepage": "https://github.com/Chlumsky/msdf-atlas-gen",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
"freetype",
|
||||
"tinyxml2",
|
||||
"libpng"
|
||||
],
|
||||
"default-features": [
|
||||
"geometry-preprocessing"
|
||||
],
|
||||
"features": {
|
||||
"geometry-preprocessing": {
|
||||
"description": "Preprocessing of non-compliant vector geometry via the Skia library",
|
||||
"dependencies": [ {
|
||||
"name": "skia",
|
||||
"default-features": false
|
||||
} ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue