mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
add MacOS ARM64 to CI builds
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
set(ASIO_FOUND FALSE)
|
||||
|
||||
if(TARGET ASIO::ASIO)
|
||||
if(TARGET asio::asio)
|
||||
set(ASIO_FOUND TRUE)
|
||||
else()
|
||||
find_package(Threads QUIET)
|
||||
@@ -38,12 +38,12 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
add_library(ASIO::ASIO INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(ASIO::ASIO PROPERTIES
|
||||
add_library(asio::asio INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(asio::asio PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "ASIO_STANDALONE"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ASIO_ROOT}/include"
|
||||
)
|
||||
target_link_libraries(ASIO::ASIO INTERFACE Threads::Threads)
|
||||
target_link_libraries(asio::asio INTERFACE Threads::Threads)
|
||||
set(ASIO_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
30
CMake_modules/FindSndFile.cmake
Normal file
30
CMake_modules/FindSndFile.cmake
Normal file
@@ -0,0 +1,30 @@
|
||||
# - Try to find libsndfile
|
||||
|
||||
# Use pkg-config to get hints about paths
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(LIBSNDFILE_PKGCONF sndfile)
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
|
||||
# Include dir
|
||||
find_path(LIBSNDFILE_INCLUDE_DIR
|
||||
NAMES sndfile.h
|
||||
PATHS ${LIBSNDFILE_PKGCONF_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Library
|
||||
find_library(LIBSNDFILE_LIBRARY
|
||||
NAMES sndfile libsndfile-1
|
||||
PATHS ${LIBSNDFILE_PKGCONF_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
find_package(PackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SndFile DEFAULT_MSG LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
||||
|
||||
if(SNDFILE_FOUND)
|
||||
add_library(SndFile::sndfile INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(SndFile::sndfile PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES ${LIBSNDFILE_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${LIBSNDFILE_INCLUDE_DIR}
|
||||
)
|
||||
endif(SNDFILE_FOUND)
|
||||
@@ -1,75 +1,81 @@
|
||||
# - Try to find GLFW3
|
||||
#
|
||||
# If no pkgconfig, define GLFW_ROOT to installation tree
|
||||
# Will define the following:
|
||||
# GLFW3_FOUND
|
||||
# GLFW3_INCLUDE_DIR
|
||||
# GLFW3_LIBRARIES
|
||||
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
IF(APPLE)
|
||||
# homebrew or macports pkgconfig locations
|
||||
SET(ENV{PKG_CONFIG_PATH} "/usr/local/opt/glfw3/lib/pkgconfig:/opt/local/lib/pkgconfig")
|
||||
ENDIF()
|
||||
SET(ENV{PKG_CONFIG_PATH} "${DEPENDS_DIR}/glfw/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
|
||||
PKG_CHECK_MODULES(GLFW3 glfw3)
|
||||
|
||||
FIND_LIBRARY(GLFW3_LIBRARY
|
||||
NAMES ${GLFW3_LIBRARIES}
|
||||
HINTS ${GLFW3_LIBRARY_DIR}
|
||||
)
|
||||
SET(GLFW3_LIBRARIES ${GLFW3_LIBRARY})
|
||||
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(GLFW3_INCLUDE_DIR
|
||||
GLFW/glfw3.h
|
||||
DOC "GLFW include directory "
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# directories in the official binary package
|
||||
IF(MINGW)
|
||||
SET(_SUFFIX lib-mingw)
|
||||
ELSEIF(MSVC11)
|
||||
SET(_SUFFIX lib-vc2012)
|
||||
ELSEIF(MSVC12)
|
||||
SET(_SUFFIX lib-vc2013)
|
||||
ELSEIF(MSVC14)
|
||||
SET(_SUFFIX lib-vc2015)
|
||||
ELSEIF(MSVC)
|
||||
SET(_SUFFIX lib-vc2012)
|
||||
ENDIF()
|
||||
|
||||
FIND_LIBRARY(GLFW3_LIBRARIES
|
||||
NAMES glfw3dll glfw3 glfw
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
${_SUFFIX}
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
FIND_FILE(GLFW3_DLL
|
||||
glfw3.dll
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
${_SUFFIX}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW3 FOUND_VAR GLFW3_FOUND
|
||||
REQUIRED_VARS GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
|
||||
# - Try to find GLFW3
|
||||
#
|
||||
# If no pkgconfig, define GLFW_ROOT to installation tree
|
||||
# Will define the following:
|
||||
# GLFW3_FOUND
|
||||
# GLFW3_INCLUDE_DIR
|
||||
# GLFW3_LIBRARIES
|
||||
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
IF(APPLE)
|
||||
# homebrew or macports pkgconfig locations
|
||||
SET(ENV{PKG_CONFIG_PATH} "/usr/local/opt/glfw3/lib/pkgconfig:/opt/local/lib/pkgconfig")
|
||||
ENDIF()
|
||||
SET(ENV{PKG_CONFIG_PATH} "${DEPENDS_DIR}/glfw/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
|
||||
PKG_CHECK_MODULES(GLFW3 glfw3)
|
||||
|
||||
FIND_LIBRARY(GLFW3_LIBRARY
|
||||
NAMES ${GLFW3_LIBRARIES}
|
||||
HINTS ${GLFW3_LIBRARY_DIR}
|
||||
)
|
||||
SET(GLFW3_LIBRARIES ${GLFW3_LIBRARY})
|
||||
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(GLFW3_INCLUDE_DIR
|
||||
GLFW/glfw3.h
|
||||
DOC "GLFW include directory "
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# directories in the official binary package
|
||||
IF(MINGW)
|
||||
SET(_SUFFIX lib-mingw)
|
||||
ELSEIF(MSVC11)
|
||||
SET(_SUFFIX lib-vc2012)
|
||||
ELSEIF(MSVC12)
|
||||
SET(_SUFFIX lib-vc2013)
|
||||
ELSEIF(MSVC14)
|
||||
SET(_SUFFIX lib-vc2015)
|
||||
ELSEIF(MSVC)
|
||||
SET(_SUFFIX lib-vc2012)
|
||||
ENDIF()
|
||||
|
||||
FIND_LIBRARY(GLFW3_LIBRARIES
|
||||
NAMES glfw3dll glfw3 glfw
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
${_SUFFIX}
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
FIND_FILE(GLFW3_DLL
|
||||
glfw3.dll
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
${_SUFFIX}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(glfw3 FOUND_VAR GLFW3_FOUND
|
||||
REQUIRED_VARS GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
|
||||
|
||||
add_library(glfw INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(glfw PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES ${GLFW3_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GLFW3_INCLUDE_DIR}
|
||||
)
|
||||
@@ -1,34 +0,0 @@
|
||||
# - Try to find libsndfile
|
||||
# Once done, this will define
|
||||
#
|
||||
# LIBSNDFILE_FOUND - system has libsndfile
|
||||
# LIBSNDFILE_INCLUDE_DIRS - the libsndfile include directories
|
||||
# LIBSNDFILE_LIBRARIES - link these to use libsndfile
|
||||
|
||||
# Use pkg-config to get hints about paths
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(LIBSNDFILE_PKGCONF sndfile)
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
|
||||
# Include dir
|
||||
find_path(LIBSNDFILE_INCLUDE_DIR
|
||||
NAMES sndfile.h
|
||||
PATHS ${LIBSNDFILE_PKGCONF_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Library
|
||||
find_library(LIBSNDFILE_LIBRARY
|
||||
NAMES sndfile libsndfile-1
|
||||
PATHS ${LIBSNDFILE_PKGCONF_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
find_package(PackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(libsndfile DEFAULT_MSG LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
||||
|
||||
if(LIBSNDFILE_FOUND)
|
||||
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
||||
endif(LIBSNDFILE_FOUND)
|
||||
|
||||
mark_as_advanced(LIBSNDFILE_LIBRARY LIBSNDFILE_LIBRARIES LIBSNDFILE_INCLUDE_DIR LIBSNDFILE_INCLUDE_DIRS)
|
||||
Reference in New Issue
Block a user