Skip to content

Commit

Permalink
Merge pull request #12 from johnpayne-dev/v1.1
Browse files Browse the repository at this point in the history
v1.1 merge
  • Loading branch information
johnpayne-dev committed Jul 26, 2022
2 parents 31a9538 + 2bfacdc commit c9596f8
Show file tree
Hide file tree
Showing 82 changed files with 513,518 additions and 78,479 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
@@ -1,3 +1,3 @@
[submodule "Submodules/SDL"]
path = Submodules/SDL
[submodule "External/SDL"]
path = External/SDL
url = https://github.com/libsdl-org/SDL.git
33 changes: 23 additions & 10 deletions CMakeLists.txt
Expand Up @@ -82,8 +82,6 @@ set(MINECRAFTC_SOURCES
MinecraftC/Level/Tile/TNTBlock.h
MinecraftC/Level/Level.c
MinecraftC/Level/Level.h
MinecraftC/Level/LevelIO.c
MinecraftC/Level/LevelIO.h
MinecraftC/Level/NextTickListEntry.h
MinecraftC/Particle/PrimedTNT.c
MinecraftC/Particle/PrimedTNT.h
Expand Down Expand Up @@ -127,6 +125,8 @@ set(MINECRAFTC_SOURCES
MinecraftC/Render/ShapeRenderer.h
MinecraftC/Render/TextureManager.c
MinecraftC/Render/TextureManager.h
MinecraftC/Sound/SoundManager.c
MinecraftC/Sound/SoundManager.h
MinecraftC/Utilities/List.c
MinecraftC/Utilities/List.h
MinecraftC/Utilities/Log.c
Expand Down Expand Up @@ -167,14 +167,18 @@ endif()
set(FLAGS "$<IF:$<CONFIG:Debug>,${DEBUG_FLAGS},${RELEASE_FLAGS}>")

add_definitions(
-DSDL_dynapi_h_
-DSDL_DYNAMIC_API=0
-DSDL_VIDEO_OPENGL_EGL=0
-DSDL_VIDEO_RENDER_OGL_ES2=0
)
-DSDL_dynapi_h_
-DSDL_DYNAMIC_API=0
-DSDL_VIDEO_OPENGL_EGL=0
-DSDL_VIDEO_RENDER_OGL_ES2=0
)

if(APPLE)
set(SOURCES ${MINECRAFTC_SOURCES} ${SDL2_COMMON_SOURCES} ${SDL2_APPLE_SOURCES})
set(SOURCES
${MINECRAFTC_SOURCES}
${SDL2_COMMON_SOURCES}
${SDL2_APPLE_SOURCES}
)
set(FLAGS ${FLAGS} "-fobjc-arc" "-Wno-deprecated")
set(LIBRARIES
"-framework AudioToolbox"
Expand All @@ -192,7 +196,12 @@ if(APPLE)
"-framework OpenGL"
)
elseif(WIN32)
set(SOURCES ${MINECRAFTC_SOURCES} ${SDL2_COMMON_SOURCES} ${SDL2_WINDOWS_SOURCES} Resources/App/AppIcon.rc)
set(SOURCES
${MINECRAFTC_SOURCES}
${SDL2_COMMON_SOURCES}
${SDL2_WINDOWS_SOURCES}
Resources/App/AppIcon.rc
)
set(LIBRARIES
opengl32
glu32
Expand All @@ -218,5 +227,9 @@ target_compile_options(MinecraftC PRIVATE ${FLAGS})
if(MSVC)
target_link_options(MinecraftC PRIVATE ${LINKER_FLAGS})
endif()
target_include_directories(MinecraftC PRIVATE Submodules/SDL/include)
target_include_directories(MinecraftC PRIVATE
External/SDL/include
External/cute_headers
External/stb
)
target_link_libraries(MinecraftC ${LIBRARIES})
1 change: 1 addition & 0 deletions External/SDL
Submodule SDL added at 3ab1e3

0 comments on commit c9596f8

Please sign in to comment.