Skip to content

Commit

Permalink
Setup build for naett - a lightweight https wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jul 21, 2023
1 parent 4a41617 commit 7ae34f1
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -47,3 +47,6 @@
[submodule "ext/rcheevos"]
path = ext/rcheevos
url = https://github.com/RetroAchievements/rcheevos.git
[submodule "ext/naett"]
path = ext/naett
url = https://github.com/erkkah/naett.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -2222,7 +2222,7 @@ else()
include_directories(ext/zstd/lib)
endif()

target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash rcheevos ${GlslangLibs}
target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash rcheevos naett ${GlslangLibs}
${CoreExtraLibs} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} ${CMAKE_DL_LIBS})

target_compile_features(${CoreLibName} PUBLIC cxx_std_17)
Expand Down
2 changes: 2 additions & 0 deletions Common/Common.vcxproj
Expand Up @@ -399,6 +399,7 @@
<ClInclude Include="..\ext\libpng17\pnglibconf.h" />
<ClInclude Include="..\ext\libpng17\pngpriv.h" />
<ClInclude Include="..\ext\libpng17\pngstruct.h" />
<ClInclude Include="..\ext\naett\naett.h" />
<ClInclude Include="..\ext\vma\vk_mem_alloc.h" />
<ClInclude Include="ABI.h" />
<ClInclude Include="Arm64Emitter.h" />
Expand Down Expand Up @@ -848,6 +849,7 @@
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</ForcedIncludeFiles>
</ClCompile>
<ClCompile Include="..\ext\naett\naett.c" />
<ClCompile Include="..\ext\vma\vk_mem_alloc.cpp" />
<ClCompile Include="ABI.cpp" />
<ClCompile Include="Arm64Emitter.cpp" />
Expand Down
9 changes: 9 additions & 0 deletions Common/Common.vcxproj.filters
Expand Up @@ -515,6 +515,9 @@
<ClInclude Include="Net\HTTPRequest.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="..\ext\naett\naett.h">
<Filter>ext\naett</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ABI.cpp" />
Expand Down Expand Up @@ -965,6 +968,9 @@
<ClCompile Include="Net\HTTPRequest.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="..\ext\naett\naett.c">
<Filter>ext\naett</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Crypto">
Expand Down Expand Up @@ -1075,6 +1081,9 @@
<Filter Include="ext\basis_universal">
<UniqueIdentifier>{d6d5f6e0-1c72-496b-af11-6d52d5123033}</UniqueIdentifier>
</Filter>
<Filter Include="ext\naett">
<UniqueIdentifier>{34f45db9-5c08-49cb-b349-b9e760ce3213}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="..\ext\libpng17\CMakeLists.txt">
Expand Down
6 changes: 5 additions & 1 deletion android/jni/Android.mk
Expand Up @@ -79,7 +79,10 @@ SPIRV_CROSS_FILES := \
$(SRC)/ext/SPIRV-Cross/spirv_glsl.cpp \
$(SRC)/ext/SPIRV-Cross/spirv_parser.cpp \
$(SRC)/ext/SPIRV-Cross/spirv_cross_parsed_ir.cpp


NAETT_FILES := \
${SRC}/ext/naett/naett.c

RCHEEVOS_FILES := \
${SRC}/ext/rcheevos/src/rapi/rc_api_common.c \
${SRC}/ext/rcheevos/src/rapi/rc_api_editor.c \
Expand Down Expand Up @@ -178,6 +181,7 @@ EXEC_AND_LIB_FILES := \
$(VMA_FILES) \
$(SPIRV_CROSS_FILES) \
$(RCHEEVOS_FILES) \
$(NAETT_FILES) \
$(EXT_FILES) \
$(NATIVE_FILES) \
$(SRC)/Common/Buffer.cpp \
Expand Down
1 change: 1 addition & 0 deletions ext/CMakeLists.txt
Expand Up @@ -31,6 +31,7 @@ add_subdirectory(snappy)
add_subdirectory(udis86)
add_subdirectory(SPIRV-Cross-build)
add_subdirectory(rcheevos-build)
add_subdirectory(naett-build)
if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO)
add_subdirectory(discord-rpc-build)
endif()
1 change: 1 addition & 0 deletions ext/naett
Submodule naett added at cad866
10 changes: 10 additions & 0 deletions ext/naett-build/CMakeLists.txt
@@ -0,0 +1,10 @@
cmake_minimum_required (VERSION 3.2.0)
project (naett)

set(SRC_DIR ../naett/src)

set(ALL_SOURCE_FILES
${SRC_DIR}/naett/naett.c
)

add_library(naett STATIC ${ALL_SOURCE_FILES})
3 changes: 3 additions & 0 deletions libretro/Makefile.common
Expand Up @@ -223,6 +223,9 @@ SOURCES_C += \
$(EXTDIR)/rcheevos/src/rhash/hash.c \
$(EXTDIR)/rcheevos/src/rhash/md5.c

SOURCES_C +=
$(EXTDIR)/naett/naett.c

COREFLAGS += -DSTACK_LINE_READER_BUFFER_SIZE=1024
ifeq ($(PLATFORM_EXT), android)
COREFLAGS += -DHAVE_DLFCN_H
Expand Down

0 comments on commit 7ae34f1

Please sign in to comment.