mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 05:58:19 +00:00
28ac9396cc
Builds and runs successfully with: cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DPREFER_BUNDLED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" ninja package_dmg Tested successfully with native arm64 and rosetta No discord support for universal binary
38 lines
1.2 KiB
CMake
38 lines
1.2 KiB
CMake
if(NOT CMAKE_CROSSCOMPILING)
|
|
find_package(PkgConfig QUIET)
|
|
pkg_check_modules(PC_FREETYPE freetype2)
|
|
endif()
|
|
|
|
set_extra_dirs_lib(FREETYPE freetype)
|
|
find_library(FREETYPE_LIBRARY
|
|
NAMES freetype.6 freetype
|
|
HINTS ${HINTS_FREETYPE_LIBDIR} ${PC_FREETYPE_LIBDIR} ${PC_FREETYPE_LIBRARY_DIRS}
|
|
PATHS ${PATHS_FREETYPE_LIBDIR}
|
|
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
|
|
)
|
|
set_extra_dirs_include(FREETYPE freetype "${FREETYPE_LIBRARY}")
|
|
find_path(FREETYPE_INCLUDEDIR
|
|
NAMES freetype/config/ftheader.h config/ftheader.h
|
|
PATH_SUFFIXES freetype2
|
|
HINTS ${HINTS_FREETYPE_INCLUDEDIR} ${PC_FREETYPE_INCLUDEDIR} ${PC_FREETYPE_INCLUDE_DIRS}
|
|
PATHS ${PATHS_FREETYPE_INCLUDEDIR}
|
|
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDEDIR)
|
|
|
|
mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDEDIR)
|
|
|
|
if(FREETYPE_FOUND)
|
|
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
|
set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDEDIR})
|
|
|
|
is_bundled(FREETYPE_BUNDLED "${FREETYPE_LIBRARY}")
|
|
if(FREETYPE_BUNDLED AND TARGET_OS STREQUAL "windows")
|
|
set(FREETYPE_COPY_FILES "${EXTRA_FREETYPE_LIBDIR}/libfreetype.dll")
|
|
else()
|
|
set(FREETYPE_COPY_FILES)
|
|
endif()
|
|
endif()
|