Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace mercurial's tar.bz2 with the primary tar.gz #4

Merged
merged 9 commits into from
Sep 6, 2018
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(POLICY CMP0058) # Dependencies
cmake_policy(SET CMP0058 NEW)
endif()

option(DOWNLOAD_SDL2_DEPENDENCY "Downloads and compiles SDL2 from official Mercurial directly" OFF)
option(DOWNLOAD_SDL2_DEPENDENCY "Download, compile, and install SDL2's master branch" OFF)
set(SDL2_REPO_PATH "" CACHE PATH "Path to the SDL2")

if(${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
Expand Down
16 changes: 11 additions & 5 deletions download_sdl2_hg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
# SDL2_INSTALL_DIR The install directory
# SDL2_REPOSITORY_PATH The reposotory directory

# Require ExternalProject!
# Require ExternalProject and GIT!
include(ExternalProject)
find_package(Git REQUIRED)

# Posttible Input Vars:
# <None>
Expand All @@ -26,11 +27,16 @@ endif()
ExternalProject_Add(
SDL2HG
PREFIX ${CMAKE_BINARY_DIR}/external/SDL2
URL https://hg.libsdl.org/SDL/archive/default.tar.bz2
# URL https://hg.libsdl.org/SDL/archive/default.tar.bz2
# Re-enable when the tarball is symlink-free for better Windows compatibility.
# In the meantime, use the auto-tracking SDL2 Git repo:
GIT_SHALLOW 1
GIT_REPOSITORY https://github.com/spurious/SDL-mirror.git
CMAKE_ARGS
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}"
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why those are quoted - ability to have space-contained paths. Removal of quotes breaks the support of them.

-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
-DSNDIO=OFF
-DSDL_SHARED=${SHARED}
-DCMAKE_DEBUG_POSTFIX=${CMAKE_DEBUG_POSTFIX}
${SDL2_CMAKE_FPIC_FLAG}
${SDL2_NOWASAPI} # WASAPI, No way!
Expand All @@ -42,6 +48,6 @@ install(
CODE "file( INSTALL \${builtSdl2Heads} DESTINATION \"${CMAKE_INSTALL_PREFIX}/include/SDL2\" )"
CODE "file( GLOB builtSdlLibs \"${CMAKE_BINARY_DIR}/lib/*SDL2*\" )"
CODE "file( INSTALL \${builtSdlLibs} DESTINATION \"${CMAKE_INSTALL_PREFIX}/lib\" )"
CODE "file( GLOB builtSdlBins \"${CMAKE_BINARY_DIR}/bin/*SDL2*\" )"
CODE "file( GLOB builtSdlBins \"${CMAKE_BINARY_DIR}/bin/*\" )"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's bad idea: every other library that included into this AudioCodecs pack is adding into same install path. so, making this you making duplicates be installed which will overflow the queue...

CODE "file( INSTALL \${builtSdlBins} DESTINATION \"${CMAKE_INSTALL_PREFIX}/bin\" )"
)