mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-20 13:33:13 -07:00
Some Build Fixes
This commit is contained in:
parent
8d0f1d7076
commit
43ddf619ed
3 changed files with 23 additions and 20 deletions
|
@ -43,8 +43,9 @@ matrix:
|
||||||
- opus
|
- opus
|
||||||
- openssl@1.1
|
- openssl@1.1
|
||||||
- nasm
|
- nasm
|
||||||
|
- sdl2
|
||||||
env:
|
env:
|
||||||
- CMAKE_PREFIX_PATH="/usr/local/opt/openssl@1.1;/usr/local/opt/qt"
|
- CMAKE_PREFIX_PATH="$TRAVIS_BUILD_DIR/ffmpeg-prefix;/usr/local/opt/openssl@1.1;/usr/local/opt/qt"
|
||||||
- CMAKE_EXTRA_ARGS=""
|
- CMAKE_EXTRA_ARGS=""
|
||||||
- DEPLOY_FILE="Chiaki.dmg"
|
- DEPLOY_FILE="Chiaki.dmg"
|
||||||
after_success:
|
after_success:
|
||||||
|
@ -59,6 +60,7 @@ script:
|
||||||
- mkdir build && cd build
|
- mkdir build && cd build
|
||||||
- cmake
|
- cmake
|
||||||
-DCMAKE_BUILD_TYPE=Release
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||||
-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH
|
-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH
|
||||||
-DCHIAKI_ENABLE_TESTS=ON
|
-DCHIAKI_ENABLE_TESTS=ON
|
||||||
-DCHIAKI_ENABLE_CLI=OFF
|
-DCHIAKI_ENABLE_CLI=OFF
|
||||||
|
|
|
@ -46,14 +46,20 @@ function (_ffmpeg_find component headername)
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
pkg_check_modules(FFMPEG_${component} lib${component} IMPORTED_TARGET)
|
pkg_check_modules(FFMPEG_${component} lib${component} IMPORTED_TARGET)
|
||||||
if(FFMPEG_${component}_FOUND)
|
if(FFMPEG_${component}_FOUND)
|
||||||
join(FFMPEG_LDFLAGS_STRING " " ${FFMPEG_${component}_LDFLAGS})
|
if(APPLE)
|
||||||
string(REGEX REPLACE "-Wl,-framework,([^ ]+)" "-framework \\1" FFMPEG_LDFLAGS_STRING_CLEAN ${FFMPEG_LDFLAGS_STRING})
|
join(FFMPEG_LDFLAGS_STRING " " ${FFMPEG_${component}_LDFLAGS})
|
||||||
string(REGEX MATCHALL "-framework [^ ]+" FFMPEG_FRAMEWORKS ${FFMPEG_LDFLAGS_STRING_CLEAN})
|
string(REGEX REPLACE "-Wl,-framework,([^ ]+)" "-framework \\1" FFMPEG_LDFLAGS_STRING_CLEAN ${FFMPEG_LDFLAGS_STRING})
|
||||||
list(APPEND FFMPEG_${component}_LIBRARIES ${FFMPEG_FRAMEWORKS})
|
string(REGEX MATCHALL "-framework [^ ]+" FFMPEG_FRAMEWORKS ${FFMPEG_LDFLAGS_STRING_CLEAN})
|
||||||
set_target_properties(PkgConfig::FFMPEG_${component} PROPERTIES
|
list(APPEND FFMPEG_${component}_LIBRARIES ${FFMPEG_FRAMEWORKS})
|
||||||
IMPORTED_GLOBAL TRUE
|
set_target_properties(PkgConfig::FFMPEG_${component} PROPERTIES
|
||||||
INTERFACE_LINK_DIRECTORIES "${FFMPEG_${component}_LIBRARY_DIRS}"
|
INTERFACE_LINK_DIRECTORIES "${FFMPEG_${component}_LIBRARY_DIRS}"
|
||||||
INTERFACE_LINK_LIBRARIES "${FFMPEG_${component}_LIBRARIES}")
|
INTERFACE_LINK_LIBRARIES "${FFMPEG_${component}_LIBRARIES}"
|
||||||
|
INTERFACE_LINK_OPTIONS "")
|
||||||
|
message("set libs to \"${FFMPEG_${component}_LIBRARIES}\"")
|
||||||
|
message("set lib dirs to \"${FFMPEG_${component}_LIBRARY_DIRS}\"")
|
||||||
|
message("set lib otps not to \"${FFMPEG_${component}_LDFLAGS}\"")
|
||||||
|
endif()
|
||||||
|
set_target_properties(PkgConfig::FFMPEG_${component} PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||||
add_library(FFMPEG::${component} ALIAS PkgConfig::FFMPEG_${component})
|
add_library(FFMPEG::${component} ALIAS PkgConfig::FFMPEG_${component})
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
@ -223,17 +229,9 @@ foreach (_ffmpeg_component IN LISTS FFMPEG_FIND_COMPONENTS)
|
||||||
endforeach ()
|
endforeach ()
|
||||||
unset(_ffmpeg_component)
|
unset(_ffmpeg_component)
|
||||||
|
|
||||||
if (FFMPEG_INCLUDE_DIRS)
|
|
||||||
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if(_ffmpeg_required_vars)
|
|
||||||
set(_ffmpeg_required_vars REQUIRED_VARS ${_ffmpeg_required_vars})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(FFMPEG
|
find_package_handle_standard_args(FFMPEG
|
||||||
${_ffmpeg_required_vars}
|
REQUIRED_VARS FFMPEG_LIBRARIES
|
||||||
VERSION_VAR FFMPEG_VERSION
|
VERSION_VAR FFMPEG_VERSION
|
||||||
HANDLE_COMPONENTS)
|
HANDLE_COMPONENTS)
|
||||||
unset(_ffmpeg_required_vars)
|
unset(_ffmpeg_required_vars)
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
|
|
||||||
find_package(SDL2 NO_MODULE QUIET)
|
find_package(SDL2 NO_MODULE QUIET)
|
||||||
|
|
||||||
if(SDL2_FOUND AND NOT TARGET SDL2::SDL2)
|
if(SDL2_FOUND AND (NOT TARGET SDL2::SDL2))
|
||||||
add_library(SDL2::SDL2 UNKNOWN IMPORTED)
|
add_library(SDL2::SDL2 UNKNOWN IMPORTED GLOBAL)
|
||||||
|
if(NOT SDL2_LIBDIR)
|
||||||
|
set(SDL2_LIBDIR "${libdir}")
|
||||||
|
endif()
|
||||||
find_library(SDL2_LIBRARY SDL2 PATHS "${SDL2_LIBDIR}" NO_DEFAULT_PATH)
|
find_library(SDL2_LIBRARY SDL2 PATHS "${SDL2_LIBDIR}" NO_DEFAULT_PATH)
|
||||||
if(SDL2_LIBRARY)
|
if(SDL2_LIBRARY)
|
||||||
set_target_properties(SDL2::SDL2 PROPERTIES
|
set_target_properties(SDL2::SDL2 PROPERTIES
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue