Skip to content
Snippets Groups Projects
Commit 54309754 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

fix cmake files - Linux-compatable include syntax

parent 84135396
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ stages: # List of stages for jobs, and their order of execution ...@@ -21,7 +21,7 @@ stages: # List of stages for jobs, and their order of execution
- deploy - deploy
.f34-ogl: .f34-ogl:
image: git.fossgalaxy.com:8042/gamedev/containers/fedora:34-opengl image: git.fossgalaxy.com:8042/gamedev/containers/fedora:36-opengl
before_script: before_script:
- dnf install -y pkgconfig\(dri\) pkgconfig\(glu\) pkgconfig\(x11\) pkgconfig\(xcursor\) pkgconfig\(xi\) pkgconfig\(xinerama\) pkgconfig\(xrandr\) doxygen - dnf install -y pkgconfig\(dri\) pkgconfig\(glu\) pkgconfig\(x11\) pkgconfig\(xcursor\) pkgconfig\(xi\) pkgconfig\(xinerama\) pkgconfig\(xrandr\) doxygen
- dnf install -y glm-devel glfw-devel openal-soft-devel spdlog-devel freetype-devel yaml-cpp-devel assimp-devel bullet-devel - dnf install -y glm-devel glfw-devel openal-soft-devel spdlog-devel freetype-devel yaml-cpp-devel assimp-devel bullet-devel
......
#cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
#project(demo) project(demo)
# Executable # Executable
add_executable(demo add_executable(demo
......
...@@ -64,8 +64,12 @@ find_package(yaml-cpp) ...@@ -64,8 +64,12 @@ find_package(yaml-cpp)
target_link_libraries(fggl PUBLIC yaml-cpp) target_link_libraries(fggl PUBLIC yaml-cpp)
# model loading # model loading
find_package(assimp) find_package(assimp CONFIG)
target_link_libraries(${PROJECT_NAME} PUBLIC assimp::assimp) if ( MSVC )
target_link_libraries(${PROJECT_NAME} PUBLIC assimp::assimp)
else()
target_link_libraries(${PROJECT_NAME} PUBLIC assimp)
endif()
find_package(Freetype) find_package(Freetype)
target_link_libraries(${PROJECT_NAME} PUBLIC Freetype::Freetype) target_link_libraries(${PROJECT_NAME} PUBLIC Freetype::Freetype)
......
...@@ -4,7 +4,17 @@ if ( NOT Bullet_FOUND ) ...@@ -4,7 +4,17 @@ if ( NOT Bullet_FOUND )
message(WARNING "Bullet not found - disabling bullet physics integration") message(WARNING "Bullet not found - disabling bullet physics integration")
else() else()
message(STATUS "Bullet found") message(STATUS "Bullet found")
target_link_libraries(fggl PUBLIC LinearMath Bullet3Common BulletCollision BulletDynamics BulletSoftBody )
if ( MSVC )
# see https://github.com/microsoft/vcpkg/issues/7877
target_link_libraries(fggl PUBLIC LinearMath Bullet3Common BulletDynamics BulletSoftBody BulletCollision BulletInverseDynamics)
else()
# FIXME: this shouldn't be necessary, for modern cmake, linking the libraries should be enough
target_compile_definitions(fggl PUBLIC ${BULLET_DEFINITIONS})
target_include_directories(fggl PUBLIC ${BULLET_INCLUDE_DIRS})
target_link_libraries(fggl PUBLIC ${BULLET_LIBRARIES})
endif()
# bullet cpp files # bullet cpp files
target_sources(fggl target_sources(fggl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment