Last active
March 14, 2022 16:20
-
-
Save umjammer/c7e8b4ea5a59a40f61b5b8133e27aaa3 to your computer and use it in GitHub Desktop.
[Emu] NP2Kai macos w/ brew sdl2, openssl patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/CMakeLists.txt b/CMakeLists.txt | |
| index 03e6f74..6f96592 100644 | |
| --- a/CMakeLists.txt | |
| +++ b/CMakeLists.txt | |
| @@ -19,6 +19,13 @@ endif() | |
| # Git | |
| find_package(Git) | |
| +find_library ( | |
| + SSL_LIB | |
| + NAMES ssl libssl crypto libcrypto | |
| + HINTS "${OPENSSL_ROOT_DIR}/lib" | |
| + NO_DEFAULT_PATH | |
| +) | |
| + | |
| # NP2kai Git version | |
| if(DEFINED ENV{NP2KAI_VERSION}) | |
| set(NP2kai_GIT_TAG $ENV{NP2KAI_VERSION}) | |
| @@ -688,7 +695,7 @@ target_sources(NP2kai_bbase INTERFACE ${NP2kai_common_sources}) | |
| if(NP2kai_Windows AND NOT MSVC_VERSION) | |
| target_link_libraries(NP2kai_bbase INTERFACE stdc++) | |
| elseif(NOT NP2kai_Windows) | |
| -target_link_libraries(NP2kai_bbase INTERFACE ssl crypto) | |
| +target_link_libraries(NP2kai_bbase INTERFACE ${SSL_LIB}) | |
| endif() | |
| add_library(NP2kai_base INTERFACE) | |
| @@ -795,7 +802,7 @@ else() | |
| #target_include_directories(NP2kai_SDL_SDL2_base INTERFACE ${NP2kai_SDL_UNIX_dirs} ${OPENSSL_INCLUDE_DIR} ${lib_usb_include_dirs} ${lib_vst3sdk_include_dirs}) | |
| #target_link_libraries(NP2kai_SDL_SDL2_base INTERFACE ${lib_math_libraries} ${lib_vst3sdk_libraries} ${lib_Threads_libraries} SDL2::Main SDL2::Mixer SDL2::TTF ${lib_SDL_depend_libraries} ${lib_SDL_mixer_depend_libraries} ${lib_SDL_ttf_depend_libraries} ${OPENSSL_LIBRARIES} ${lib_usb_libraries} ${lib_dl_libraries}) | |
| target_include_directories(NP2kai_SDL_SDL2_base INTERFACE ${OPENSSL_INCLUDE_DIR} ${SDL2_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR} ${SDL2_TTF_INCLUDE_DIR} ${lib_usb_include_dirs} ${lib_vst3sdk_include_dirs}) | |
| - target_link_libraries(NP2kai_SDL_SDL2_base INTERFACE ${lib_math_libraries} ssl crypto ${lib_vst3sdk_libraries} ${lib_Threads_libraries} ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} ${SDL2_TTF_LIBRARY} ${lib_SDL_depend_libraries} ${lib_SDL_mixer_depend_libraries} ${lib_SDL_ttf_depend_libraries} ${OPENSSL_LIBRARIES} ${lib_usb_libraries} ${lib_dl_libraries}) | |
| + target_link_libraries(NP2kai_SDL_SDL2_base INTERFACE ${lib_math_libraries} ${SSL_LIB} ${lib_vst3sdk_libraries} ${lib_Threads_libraries} ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} ${SDL2_TTF_LIBRARY} ${lib_SDL_depend_libraries} ${lib_SDL_mixer_depend_libraries} ${lib_SDL_ttf_depend_libraries} ${OPENSSL_LIBRARIES} ${lib_usb_libraries} ${lib_dl_libraries}) | |
| add_library(NP2kai_X_SDL1_base INTERFACE) | |
| target_sources(NP2kai_X_SDL1_base INTERFACE ${NP2kai_X_sources} ${NP2kai_Thread_sources} ${NP2kai_TickCount_sources} ${NP2kai_Network_sources}) | |
| diff --git a/compiler_base.h b/compiler_base.h | |
| index f3da46b..abd27b8 100755 | |
| --- a/compiler_base.h | |
| +++ b/compiler_base.h | |
| @@ -5,6 +5,10 @@ | |
| #ifndef _COMPILER_BASE_H_ | |
| #define _COMPILER_BASE_H_ | |
| +#if defined(__APPLE__) | |
| +#include <unistd.h> | |
| +#endif | |
| + | |
| #if defined(__LIBRETRO__) | |
| #include <libretro.h> | |
| #endif | |
| diff --git a/network/net.c b/network/net.c | |
| index d6b88a1..d649306 100755 | |
| --- a/network/net.c | |
| +++ b/network/net.c | |
| @@ -24,6 +24,10 @@ | |
| #include <network/lgy98.h> | |
| #endif | |
| +#if !defined(_WINDOWS) | |
| +uint32_t GetTickCount(void); | |
| +#endif | |
| + | |
| #if defined(_WINDOWS) | |
| #include <winioctl.h> | |
| #include <tchar.h> | |
| diff --git a/sdl/taskmng.c b/sdl/taskmng.c | |
| index 1921e2d..0fa89c8 100755 | |
| --- a/sdl/taskmng.c | |
| +++ b/sdl/taskmng.c | |
| @@ -1,4 +1,8 @@ | |
| #define _POSIX_C_SOURCE 199309L | |
| +#if defined(__APPLE__) | |
| +#include <sys/_types/_size_t.h> | |
| +void memset_pattern4(void *__b, const void *__pattern4, size_t __len); | |
| +#endif | |
| #include <compiler.h> | |
| #include "inputmng.h" | |
| #include "taskmng.h" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment