Skip to content
Permalink
Browse files

Merge pull request #1549 from TheCycoONE/vcpkg_bump

[RDY] Bump vcpkg deps
  • Loading branch information...
Alberth289346 committed Jun 11, 2019
2 parents 9d7b17f + 3335603 commit 036e71085dfebd61eb14a5bb4f4d3b9184091887
Showing with 35 additions and 31 deletions.
  1. +7 −13 CMake/CopyVcpkgLua.cmake
  2. +1 −1 CMake/VcpkgDeps.cmake
  3. +26 −16 CorsixTH/CMakeLists.txt
  4. +1 −1 scripts/build_vcpkg_deps.ps1
@@ -1,25 +1,19 @@
# Add an extra step to copy LUA files from vcpkg
add_custom_command(TARGET CorsixTH POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${VCPKG_INSTALLED_PATH}/share/lua"
$<TARGET_FILE_DIR:CorsixTH>
)

add_custom_command(TARGET CorsixTH POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove
$<TARGET_FILE_DIR:CorsixTH>/COPYRIGHT
"${VCPKG_INSTALLED_PATH}/share/lua/socket"
$<TARGET_FILE_DIR:CorsixTH>/mime
)

add_custom_command(TARGET CorsixTH POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${VCPKG_INSTALLED_PATH}/share/lua/ltn12.lua"
"${VCPKG_INSTALLED_PATH}/share/lua/mime.lua"
"${VCPKG_INSTALLED_PATH}/share/lua/re.lua"
"${VCPKG_INSTALLED_PATH}/share/lua/socket.lua"
"${VCPKG_INSTALLED_PATH}/$<$<CONFIG:Debug>:debug/>bin/lfs.dll"
$<TARGET_FILE_DIR:CorsixTH>/lfs.dll
)

add_custom_command(TARGET CorsixTH POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${VCPKG_INSTALLED_PATH}/$<$<CONFIG:Debug>:debug/>bin/lpeg.dll"
$<TARGET_FILE_DIR:CorsixTH>/lpeg.dll
$<TARGET_FILE_DIR:CorsixTH>
)

add_custom_command(TARGET CorsixTH POST_BUILD
@@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

set(VCPKG_COMMIT_SHA "1a9f008c2b532eac72ebe6e988574dc260bf7151")
set(VCPKG_COMMIT_SHA "36675cf48853dc70a64c4e31bde50b439d1448fc")

# Setup the various paths we are using
set(_VCPKG_SCRIPT_NAME "build_vcpkg_deps.ps1")
@@ -133,13 +133,18 @@ target_link_libraries(CorsixTH ${CMAKE_THREAD_LIBS_INIT})

# Find SDL_mixer
if(CORSIX_TH_USE_SDL_MIXER)
find_package(SDL2_mixer REQUIRED)
if(SDLMIXER_FOUND)
target_link_libraries(CorsixTH ${SDLMIXER_LIBRARY})
include_directories(${SDLMIXER_INCLUDE_DIR})
message(" SDL_mixer found")
if(MSVC AND USE_VCPKG_DEPS)
find_package(sdl2-mixer CONFIG REQUIRED)
target_link_libraries(CorsixTH SDL2::SDL2_mixer)
else()
message(FATAL_ERROR "Error: SDL_mixer library not found, even though it was selected to be included")
find_package(SDL2_mixer REQUIRED)
if(SDLMIXER_FOUND)
target_link_libraries(CorsixTH ${SDLMIXER_LIBRARY})
include_directories(${SDLMIXER_INCLUDE_DIR})
message(" SDL_mixer found")
else()
message(FATAL_ERROR "Error: SDL_mixer library not found, even though it was selected to be included")
endif()
endif()
endif()

@@ -176,17 +181,22 @@ endif()

# Find Freetype2
if(CORSIX_TH_USE_FREETYPE2)
find_package(Freetype REQUIRED)
if(FREETYPE_FOUND)
target_link_libraries(CorsixTH ${FREETYPE_LIBRARIES})
include_directories(${FREETYPE_INCLUDE_DIRS})
if(APPLE)
target_link_libraries(CorsixTH libz.dylib)
target_link_libraries(CorsixTH libbz2.dylib)
endif()
message(" FreeType2 found")
if(MSVC AND USE_VCPKG_DEPS)
find_package(Freetype REQUIRED)
target_link_libraries(CorsixTH Freetype::Freetype)
else()
message(FATAL_ERROR "Error: FreeType2 library not found, even though it was selected to be used")
find_package(Freetype REQUIRED)
if(FREETYPE_FOUND)
target_link_libraries(CorsixTH ${FREETYPE_LIBRARIES})
include_directories(${FREETYPE_INCLUDE_DIRS})
if(APPLE)
target_link_libraries(CorsixTH libz.dylib)
target_link_libraries(CorsixTH libbz2.dylib)
endif()
message(" FreeType2 found")
else()
message(FATAL_ERROR "Error: FreeType2 library not found, even though it was selected to be used")
endif()
endif()
endif()

@@ -34,7 +34,7 @@ Param(
################

$anim_view_libs = "wxwidgets"
$corsixth_libs = "ffmpeg", "freetype", "lua", "luafilesystem", "lpeg", "sdl2", "sdl2-mixer", "luasocket"
$corsixth_libs = "ffmpeg", "freetype", "lua", "luafilesystem", "lpeg", "sdl2", "sdl2-mixer[libflac,mpg123,libmodplug,libvorbis]", "luasocket"

$vcpkg_git_url = "https://github.com/CorsixTH/vcpkg"

0 comments on commit 036e710

Please sign in to comment.
You can’t perform that action at this time.