merged from herbglitch/master
This commit is contained in:
commit
2f221987af
21 changed files with 339 additions and 10 deletions
|
|
@ -31,7 +31,46 @@ set_property(CACHE ARCHEUS_STD_GRAPHICS_BACKEND PROPERTY STRINGS NONE SDL2 OPENG
|
|||
set(ARCHEUS_STD_FLAGS "")
|
||||
set(ARCHEUS_STD_LIBRARIES "")
|
||||
|
||||
<<<<<<< HEAD
|
||||
# ~ ARCHEUS_SOURCES ~ #
|
||||
=======
|
||||
if(ARCHEUS_STD_DEBUG)
|
||||
string(APPEND ARCHEUS_STD_FLAGS "-Wall -Werror -g -ggdb -DARC_DEBUG ")
|
||||
endif()
|
||||
|
||||
if(ARCHEUS_STD_DEFAULT_CONFIG)
|
||||
string(APPEND ARCHEUS_STD_FLAGS "-DARC_DEFAULT_CONFIG ")
|
||||
endif()
|
||||
|
||||
if(ARCHEUS_STD_SDL)
|
||||
if(NOT PNG AND WIN32 AND NOT MSVC)
|
||||
set(PNG_LIBRARY "C:/Program Files(x86)/libpng")
|
||||
set(PNG_PNG_INCLUDE_DIR "C:/Program Files(x86)/libpng/include")
|
||||
endif()
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2_image REQUIRED)
|
||||
find_package(SDL2_ttf REQUIRED)
|
||||
find_package(SDL2_mixer REQUIRED)
|
||||
|
||||
string(APPEND ARCHEUS_STD_FLAGS "-DARC_SDL ")
|
||||
endif()
|
||||
|
||||
if(ARCHEUS_STD_GLFW)
|
||||
string(APPEND ARCHEUS_STD_FLAGS "-DARC_GLFW ")
|
||||
endif()
|
||||
|
||||
if(ARCHEUS_STD_GLEW)
|
||||
string(APPEND ARCHEUS_STD_FLAGS "-DARC_GLEW ")
|
||||
endif()
|
||||
|
||||
if(ARCHEUS_STD_OPENGL)
|
||||
string(APPEND ARCHEUS_STD_FLAGS "-DARC_OPENGL")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS ${ARCHEUS_STD_FLAGS})
|
||||
|
||||
>>>>>>> 5750185bd8a38ce2a450f47e3bd8d5315b455561
|
||||
set(ARCHEUS_STD_SOURCES
|
||||
src/std/config.c
|
||||
src/std/errno.c
|
||||
|
|
@ -45,6 +84,7 @@ set(ARCHEUS_STD_SOURCES
|
|||
src/math/circle.c
|
||||
src/math/config.c
|
||||
src/math/obround.c
|
||||
src/math/point.c
|
||||
src/math/rectangle.c
|
||||
src/math/vector2.c
|
||||
|
||||
|
|
@ -54,6 +94,7 @@ set(ARCHEUS_STD_SOURCES
|
|||
src/engine/state.c
|
||||
)
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
string(APPEND ARCHEUS_STD_FLAGS "-Wall -Werror -g -ggdb -DARC_DEBUG ")
|
||||
endif()
|
||||
|
|
@ -85,6 +126,27 @@ if(ARCHEUS_STD_GLEW)
|
|||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS ${ARCHEUS_STD_FLAGS})
|
||||
=======
|
||||
set(ARCHEUS_STD_SDL_SOURCES
|
||||
src/audio/sdl/audio.c
|
||||
src/audio/sdl/config.c
|
||||
|
||||
src/input/sdl/keyboard.c
|
||||
src/input/sdl/mouse.c
|
||||
|
||||
src/graphics/sdl/circle.c
|
||||
src/graphics/sdl/config.c
|
||||
src/graphics/sdl/line.c
|
||||
src/graphics/sdl/obround.c
|
||||
src/graphics/sdl/rectangle.c
|
||||
src/graphics/sdl/renderer.c
|
||||
src/graphics/sdl/sprite.c
|
||||
src/graphics/sdl/spritesheet.c
|
||||
src/graphics/sdl/text.c
|
||||
src/graphics/sdl/view.c
|
||||
src/graphics/sdl/window.c
|
||||
)
|
||||
>>>>>>> 5750185bd8a38ce2a450f47e3bd8d5315b455561
|
||||
|
||||
set(ARCHEUS_STD_OPENGL_SOURCES
|
||||
src/graphics/opengl/config.c
|
||||
|
|
@ -119,9 +181,20 @@ target_include_directories(archeus_std
|
|||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
)
|
||||
|
||||
<<<<<<< HEAD
|
||||
target_link_libraries(archeus_std
|
||||
PUBLIC m
|
||||
)
|
||||
=======
|
||||
target_link_libraries(archeus_std PUBLIC ${SDL2_LIBRARIES} SDL2_image::SDL2_image SDL2_ttf::SDL2_ttf SDL2_mixer::SDL2_mixer)
|
||||
endif()
|
||||
|
||||
if(ARCHEUS_STD_OPENGL)
|
||||
target_include_directories(archeus_std PRIVATE
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
)
|
||||
endif()
|
||||
>>>>>>> 5750185bd8a38ce2a450f47e3bd8d5315b455561
|
||||
|
||||
install(TARGETS archeus_std EXPORT archeus_std_Exports
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue