Skip to content

Commit 184fa9e

Browse files
committed
Try adding files
0 parents  commit 184fa9e

39 files changed

+914
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vscode/
2+
build/
3+
extra-DLLs/
4+
i686-w64-mingw32/
5+
x86_64-w64-mingw32/

CMakeLists.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
3+
project(base)
4+
5+
add_executable(base
6+
src/main.cpp
7+
)
8+
9+
set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
10+
11+
set(CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc -static-libstdc++ -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")
12+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive")
13+
14+
find_package(SDL2 REQUIRED)
15+
find_package(SDL2_image REQUIRED)
16+
find_package(SDL2_ttf REQUIRED)
17+
18+
19+
target_include_directories(base
20+
PUBLIC ${SDL2_INCLUDE_DIRS}
21+
PUBLIC ${SDL2IMAGE_INCLUDE_DIRS}
22+
PUBLIC ${SDL2_ttf_config_path}
23+
)
24+
25+
target_link_libraries(base PUBLIC ${SDL2_LIBRARIES} SDL2_image::SDL2_image mingw32)
26+
target_link_libraries(base PUBLIC ${SDL2_LIBRARIES} SDL2_ttf::SDL2_ttf mingw32)

cmake/sdl2-config-version.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SDL2 CMake version configuration file:
2+
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-mingw
3+
4+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
5+
set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2/sdl2-config-version.cmake")
6+
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
7+
set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2/sdl2-config-version.cmake")
8+
else()
9+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
10+
return()
11+
endif()
12+
13+
if(NOT EXISTS "${sdl2_config_path}")
14+
message(WARNING "${sdl2_config_path} does not exist: MinGW development package is corrupted")
15+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
16+
return()
17+
endif()
18+
19+
include("${sdl2_config_path}")

cmake/sdl2-config.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SDL2 CMake configuration file:
2+
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-mingw
3+
4+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
5+
set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake")
6+
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
7+
set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake")
8+
else()
9+
set(SDL2_FOUND FALSE)
10+
return()
11+
endif()
12+
13+
if(NOT EXISTS "${sdl2_config_path}")
14+
message(WARNING "${sdl2_config_path} does not exist: MinGW development package is corrupted")
15+
set(SDL2_FOUND FALSE)
16+
return()
17+
endif()
18+
19+
include("${sdl2_config_path}")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SDL2_image CMake version configuration file:
2+
# This file is meant to be placed in a cmake subfolder of SDL2_image-devel-2.x.y-mingw
3+
4+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
5+
set(sdl2_image_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2_image/sdl2_image-config-version.cmake")
6+
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
7+
set(sdl2_image_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2_image/sdl2_image-config-version.cmake")
8+
else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
9+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
10+
return()
11+
endif()
12+
13+
if(NOT EXISTS "${sdl2_image_config_path}")
14+
message(WARNING "${sdl2_image_config_path} does not exist: MinGW development package is corrupted")
15+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
16+
return()
17+
endif()
18+
19+
include("${sdl2_image_config_path}")

cmake/sdl2_image-config.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SDL2_image CMake configuration file:
2+
# This file is meant to be placed in a cmake subfolder of SDL2_image-devel-2.x.y-mingw
3+
4+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
5+
set(sdl2_image_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2_image/sdl2_image-config.cmake")
6+
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
7+
set(sdl2_image_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2_image/sdl2_image-config.cmake")
8+
else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
9+
set(SDL2_image_FOUND FALSE)
10+
return()
11+
endif()
12+
13+
if(NOT EXISTS "${sdl2_image_config_path}")
14+
message(WARNING "${sdl2_image_config_path} does not exist: MinGW development package is corrupted")
15+
set(SDL2_image_FOUND FALSE)
16+
return()
17+
endif()
18+
19+
include("${sdl2_image_config_path}")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SDL2_ttf CMake version configuration file:
2+
# This file is meant to be placed in a cmake subfolder of SDL2_ttf-devel-2.x.y-mingw
3+
4+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
5+
set(sdl2_ttf_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2_ttf/sdl2_ttf-config-version.cmake")
6+
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
7+
set(sdl2_ttf_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2_ttf/sdl2_ttf-config-version.cmake")
8+
else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
9+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
10+
return()
11+
endif()
12+
13+
if(NOT EXISTS "${sdl2_ttf_config_path}")
14+
message(WARNING "${sdl2_ttf_config_path} does not exist: MinGW development package is corrupted")
15+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
16+
return()
17+
endif()
18+
19+
include("${sdl2_ttf_config_path}")

cmake/sdl2_ttf-config.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SDL2_ttf CMake configuration file:
2+
# This file is meant to be placed in a cmake subfolder of SDL2_ttf-devel-2.x.y-mingw
3+
4+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
5+
set(sdl2_ttf_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2_ttf/sdl2_ttf-config.cmake")
6+
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
7+
set(sdl2_ttf_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2_ttf/sdl2_ttf-config.cmake")
8+
else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
9+
set(SDL2_ttf_FOUND FALSE)
10+
return()
11+
endif()
12+
13+
if(NOT EXISTS "${sdl2_ttf_config_path}")
14+
message(WARNING "${sdl2_ttf_config_path} does not exist: MinGW development package is corrupted")
15+
set(SDL2_ttf_FOUND FALSE)
16+
return()
17+
endif()
18+
19+
include("${sdl2_ttf_config_path}")

idea/.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

idea/.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)