Skip to content

Commit

Permalink
This is the stablest it can go. Also I fixed ssl?
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusGuy committed Sep 5, 2024
1 parent 6bef500 commit 5e41243
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 1,726 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,20 +294,18 @@ if(ENABLE_DISCORD)
target_link_libraries(supertux2_lib PUBLIC LibDiscord)
endif()

# FIXME: Some libraries made by Provide*.cmake
# scripts are not passed to the linker. This
# forcefully links them
# FIXME: Very janky development enviroment!
if(ANDROID)
target_link_libraries(supertux2_lib PUBLIC physfs)
target_link_libraries(supertux2_lib PUBLIC libcurl)
target_link_libraries(supertux2_lib PUBLIC OpenAL)
target_link_libraries(supertux2_lib PUBLIC ogg)
target_link_libraries(supertux2_lib PUBLIC vorbis)
target_link_libraries(supertux2_lib PUBLIC vorbisenc)
target_link_libraries(supertux2_lib PUBLIC vorbisfile)
target_link_libraries(supertux2_lib PUBLIC glm)
find_library(png png)
target_link_libraries(supertux2_lib PUBLIC png)

# This is fine, though.
find_library(log-lib log)
target_link_libraries(supertux2_lib PUBLIC ${log-lib})
endif()
Expand Down
90 changes: 53 additions & 37 deletions mk/android/app/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# FIXME: Very janky development enviroment!
cmake_minimum_required(VERSION 3.6)

message("HELLO FROM CMAKE")
Expand All @@ -21,6 +22,8 @@ function(dump_cmake_variables)
endforeach()
endfunction()

message("MARTY: ${CMAKE_BINARY_DIR}")

macro(subdirlist result curdir)
file(GLOB children ${curdir}/*)
set(dirlist "")
Expand All @@ -38,6 +41,9 @@ cache_set(CMAKE_VERBOSE_MAKEFILE ON BOOL)
cache_set(SDL2_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/SDL/include PATH)
cache_set(SDL2IMAGE_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/SDL_image PATH)
cache_set(PNG_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/libpng PATH)
cache_set(PNG_LIBRARY png STRING)
cache_set(PNG_SHARED ON BOOL)
add_subdirectory(libpng)

cache_set(SDL2IMAGE_INSTALL OFF BOOL)
cache_set(SDL2TTF_INSTALL OFF BOOL)
Expand All @@ -52,73 +58,83 @@ cache_set(SDL2MIXER_OPUS OFF BOOL)
cache_set(SDL2MIXER_FLAC OFF BOOL)
cache_set(SDL2TTF_VENDORED ON BOOL)
cache_set(SDL2MIXER_VENDORED ON BOOL)
cache_set(SDL2_DISABLE_UNINSTALL ON BOOL)
cache_set(SDL2_LIBRARIES SDL2 STRING)
cache_set(SDL2IMAGE_PNG ON BOOL)
cache_set(SDL2IMAGE_PNG_VENDORED ON BOOL)
add_subdirectory(SDL)
add_subdirectory(SDL_image)
add_subdirectory(SDL_ttf)

cache_set(OPENSSL_ROOT_DIR "${PROJECT_SOURCE_DIR}/openssl/" STRING)
cache_set(OPENSSL_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/openssl/include" STRING)
cache_set(OPENSSL_CRYPTO_LIBRARY "${PROJECT_SOURCE_DIR}/openssl/crypto" STRING)
cache_set(OPENSSL_SSL_LIBRARY "${PROJECT_SOURCE_DIR}/openssl/ssl" STRING)
add_subdirectory(openssl-cmake)

# watch this backfire terribly
cache_set(CURL_USE_OPENSSL ON BOOL)
cache_set(HTTP_ONLY ON BOOL)
#cache_set(HTTP_ONLY ON BOOL)
cache_set(BUILD_TESTING OFF BOOL)
cache_set(CURL_ENABLE_EXPORT_TARGET OFF BOOL)
cache_set(CURL_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/curl/include" STRING)

cache_set(PHYSFS_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/physfs/src/" STRING)
cache_set(CURL_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/curl/include" STRING)
cache_set(CURL_LIBRARY libcurl STRING)
add_subdirectory(curl)

cache_set(USE_SYSTEM_TINYGETTEXT ON BOOL)
cache_set(TINYGETTEXT_LIBRARY tinygettext STRING)
cache_set(TINYGETTEXT_WITH_SDL ON BOOL)
cache_set(HAVE_SDL ON BOOL)
cache_set(TINYGETTEXT_PATH "${PROJECT_SOURCE_DIR}/tinygettext/" STRING)
add_subdirectory(supertux/external/tinygettext)

cache_set(OPENAL_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/openal-soft/include/AL" STRING)
cache_set(OPENAL_LIBRARY OpenAL STRING)
add_subdirectory(openal-soft)

cache_set(OGG_LIBRARY ogg STRING)
cache_set(OGG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/ogg/include" STRING)
add_subdirectory(ogg)

cache_set(VORBIS_LIBRARY vorbis STRING)
cache_set(VORBIS_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/vorbis/include;${PROJECT_SOURCE_DIR}/ogg/include" STRING)
cache_set(VORBISFILE_LIBRARY vorbisfile STRING)
add_subdirectory(vorbis)

cache_set(PHYSFS_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/physfs/src/" STRING)
cache_set(BUILD_TESTS OFF BOOL)
cache_set(PHYSFS_BUILD_SHARED ON BOOL)
cache_set(PHYSFS_BUILD_TEST OFF BOOL)
cache_set(PHYSFS_BUILD_WX_TEST OFF BOOL)
add_subdirectory(supertux/external/physfs)

cache_set(USE_SYSTEM_PHYSFS ON BOOL)
cache_set(USE_SYSTEM_TINYGETTEXT ON BOOL)

add_subdirectory(SDL)
add_subdirectory(SDL_image)
add_subdirectory(libpng)
add_subdirectory(SDL_ttf)
add_subdirectory(openssl-cmake)
add_subdirectory(curl)
add_subdirectory(fmt)
add_subdirectory(glm)
add_subdirectory(ogg)
add_subdirectory(vorbis)
add_subdirectory(openal-soft)
add_subdirectory(physfs)
add_subdirectory(sexp-cpp)
add_subdirectory(tinygettext)
cache_set(glm_FOUND ON BOOL)
cache_set(USE_SYSTEM_GLM OFF BOOL)
add_subdirectory(supertux/external/glm)

add_subdirectory(supertux)

#[[
add_dependencies(supertux2
SDL2
SDL2_image
png
SDL2_ttf
ssl
crypto
libcurl
fmt
glm
ogg
vorbis
OpenAL
physfs-static
physfs
sexp
squirrel
sqstdlib
tinygettext
SDL2
SDL2_image
png
SDL2_ttf
ssl
crypto
libcurl
fmt
glm
ogg
vorbis
OpenAL
physfs-static
physfs
sexp
squirrel
sqstdlib
tinygettext
)
]]
Loading

0 comments on commit 5e41243

Please sign in to comment.