1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 17:53:47 +00:00
Aquaria/ExternalLibs/CMakeLists.txt
fgenesis 49b9e0f05a Rework & cleanup CMake project files
- Building with CMake for development is now actually sane
- Split deps into projects and extra files
- Building against external deps should still work but needs testing
- Can now build out of the box without further adjustments as long as SDL(2) is found properly
- Build Lua in C++ mode (so it can use exceptions instead of setjmp/longjmp)
  - Unfortunately we need to enable exceptions for this :(

- Remove these defines:
  * AQUARIA_BUILD_SCENEEDITOR (now always on)
  * AQUARIA_BUILD_CONSOLE (now always on)
  * BBGE_BUILD_ACHIEVEMENTS_INTERNAL (now always on unless BBGE_BUILD_STEAMWORKS is defined)
  * BBGE_BUILD_OPENGL_DYNAMIC (now always on, define BBGE_BUILD_OPENGL_STATIC if needed)
  * BBGE_BUILD_FMOD_OPENAL_BRIDGE (now always on)
- BBGE_BUILD_STEAMWORKS is not actually implemented (any volunteers?)
- Prepare later removal of SDL & the old vc90 project from the repo. See #74 for extra notes.
2022-04-07 02:38:39 +02:00

69 lines
1.5 KiB
CMake

include(tinyxml2.cmake)
include(FTGL.cmake)
include(oggvorbis.cmake)
include(lua51.cmake)
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/AL)
set(xdeps)
if(AQUARIA_USE_VFS)
add_subdirectory(ttvfs)
add_subdirectory(ttvfs_zip)
add_subdirectory(ttvfs_cfileapi)
set(xdeps ${xdeps} ttvfs ttvfs_zip ttvfs_cfileapi)
endif()
set(xsrc
algorithmx.h
ByteBuffer.h
DeflateCompressor.cpp
DeflateCompressor.h
jps.hh
luaalloc.cpp
luaalloc.h
minihttp.cpp
minihttp.h
minipstdint.h
miniz.cpp
miniz.h
stb_image.h
stb_image_resize.h
stb_image_write.h
tinylibs.cpp
# Modified version, can't use external lib
glfont2/glfont2.cpp
glfont2/glfont2.h
)
if(AQUARIA_USE_SDL2 AND SDL2_FOUND)
OPTION(AQUARIA_USE_MOJOAL "Use mojoAL instead of OpenAL (requires SDL2)" TRUE)
endif()
if(AQUARIA_USE_MOJOAL)
set(xsrc ${xsrc} mojoal.c)
set(OPENAL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/AL" CACHE PATH "OpenAL include directory" FORCE)
else()
find_package(OpenAL REQUIRED)
SET(xdeps ${xdeps} ${OPENAL_LIBRARY})
endif()
IF(WIN32)
SET(xdeps ${xdeps} "ws2_32")
ENDIF(WIN32)
IF(HAIKU)
SET(xdeps ${xdeps} "network")
ENDIF()
IF(APPLE)
SET(xdeps ${xdeps} "-framework Carbon")
SET(xdeps ${xdeps} "-framework Cocoa")
#SET(xdeps ${xdeps} "-framework OpenAL")
ENDIF()
add_library(ExternalLibs ${xsrc})
target_link_libraries(ExternalLibs FTGL libogg tinyxml2 libvorbis ${SDL_LIBRARY} ${xdeps})