Initial commit
This commit is contained in:
51
CMakeLists.txt
Normal file
51
CMakeLists.txt
Normal file
@@ -0,0 +1,51 @@
|
||||
cmake_minimum_required(VERSION 3.13.0)
|
||||
project(jolt-physics)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
# The COMPONENTS part checks that OGRE was built the way we need it
|
||||
# The CONFIG flag makes sure we get OGRE instead of OGRE-next
|
||||
find_package(OGRE REQUIRED COMPONENTS Bites Paging Terrain CONFIG)
|
||||
find_package(ZLIB)
|
||||
find_package(SDL2)
|
||||
find_package(assimp REQUIRED CONFIG)
|
||||
find_package(OgreProcedural REQUIRED CONFIG)
|
||||
find_package(pugixml REQUIRED CONFIG)
|
||||
find_package(flecs REQUIRED CONFIG)
|
||||
|
||||
add_library(fix::assimp INTERFACE IMPORTED)
|
||||
set_target_properties(fix::assimp PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "${ASSIMP_LIBRARIES};pugixml"
|
||||
INTERFACE_LINK_DIRECTORIES "${ASSIMP_LIBRARY_DIRS}"
|
||||
)
|
||||
|
||||
add_library(fix::OgreProcedural INTERFACE IMPORTED)
|
||||
set_target_properties(fix::OgreProcedural PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "OgreProcedural"
|
||||
INTERFACE_LINK_DIRECTORIES "${CMAKE_PREFIX_PATH}/lib"
|
||||
)
|
||||
|
||||
if(OGRE_STATIC)
|
||||
add_library(OgreGLSupportStatic INTERFACE IMPORTED)
|
||||
set_target_properties(OgreGLSupportStatic PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "OgreGLSupportStatic"
|
||||
INTERFACE_LINK_DIRECTORIES "${CMAKE_PREFIX_PATH}/lib"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(fix::pugixml INTERFACE IMPORTED)
|
||||
set_target_properties(fix::pugixml PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "pugixml"
|
||||
INTERFACE_LINK_DIRECTORIES "${CMAKE_PREFIX_PATH}/lib"
|
||||
)
|
||||
# add the source files as usual
|
||||
add_executable(jolt-demo main.cpp)
|
||||
|
||||
# this also sets the includes and pulls third party dependencies
|
||||
target_link_libraries(jolt-demo OgreBites OgrePaging ${ASSIMP_LIBRARIES}
|
||||
-Wl,--as-needed
|
||||
)
|
||||
if(OGRE_STATIC)
|
||||
target_link_options(jolt-demo PRIVATE -static-libstdc++ -static-libgcc)
|
||||
endif()
|
||||
#add_dependencies(0_Bootstrap stage_files import_vrm)
|
||||
|
||||
Reference in New Issue
Block a user