Skip to content

Commit

Permalink
Updated CMake to include linking up to more libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Oct 29, 2024
1 parent d4b78b0 commit 34d28d3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
28 changes: 12 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,22 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") # works (in creating the

find_package(OpenGL REQUIRED)
find_package(glfw3 REQUIRED)
if(WIN32)

find_package(Vulkan REQUIRED)
find_package(VulkanHeaders REQUIRED)
endif(WIN32)

if(LINUX)
find_package(VulkanLoader REQUIRED)
endif(LINUX)

if(APPLE)
find_package(Vulkan REQUIRED)
endif(APPLE)

find_package(glm REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
find_package(yaml-cpp REQUIRED)
# find_package(imguidocking REQUIRED)
find_package(imguidocking REQUIRED)
find_package(box2d REQUIRED)
# find_package(joltphysics REQUIRED)
# find_package(assimp REQUIRED)
find_package(joltphysics REQUIRED)
find_package(EnTT REQUIRED)

add_subdirectory(Editor)
add_subdirectory(src)
Expand Down Expand Up @@ -68,8 +63,6 @@ add_custom_command(
# Usage - used to suppress that lld-link error and use the defaulted linked .library
if(MSVC)
target_compile_options(${PROJECT_NAME} PUBLIC "/Z1" "/NOD")
# else()
# target_compile_options(${PROJECT_NAME} PUBLIC "-fsanitize=address")
endif(MSVC)

# target_include_directory is setting some private settings for differentiating what internal includes are privates and what should be includes should be exposed to the application-dev
Expand All @@ -88,9 +81,10 @@ target_link_libraries(
fmt::fmt
spdlog::spdlog
yaml-cpp::yaml-cpp
# imguidocking::imguidocking
imguidocking::imguidocking
box2d::box2d
# Jolt::Jolt
Jolt::Jolt
EnTT::EnTT
)
endif(WIN32)

Expand All @@ -105,9 +99,10 @@ target_link_libraries(
fmt::fmt
spdlog::spdlog
yaml-cpp::yaml-cpp
# imguidocking::imguidocking
imguidocking::imguidocking
box2d::box2d
Jolt::Jolt
EnTT::EnTT
)
endif(LINUX)

Expand All @@ -118,13 +113,14 @@ target_link_libraries(
glfw
${OPENGL_LIBRARIES}
Vulkan::Vulkan
# vulkan-headers::vulkan-headers
vulkan-headers::vulkan-headers
glm::glm
fmt::fmt
spdlog::spdlog
yaml-cpp::yaml-cpp
# imguidocking::imguidocking
imguidocking::imguidocking
box2d::box2d
EnTT::EnTT
)
endif(APPLE)

Expand Down
19 changes: 10 additions & 9 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def requirements(self):
self.requires("make/4.4.1")
self.tool_requires("cmake/3.27.1")
self.requires("glfw/3.4", transitive_headers=True)
self.requires("opengl/system", transitive_headers=True)


# These end in 1.0 because they are engine3d-customized conan packages
# Slighly modified of the conan packages and it's CMake generators to using "Unix Makefiles"
Expand All @@ -34,19 +36,18 @@ def requirements(self):
self.requires("glm/1.0.1", transitive_headers=True)
self.requires("yaml-cpp/0.8.0", transitive_headers=True)
self.requires("box2d/2.4.2")
self.requires("opengl/system", transitive_headers=True)

# engine3d-dev customized conan packages for these dependencies
self.requires("imguidocking/1.0")
self.requires("entt/3.13.2")

if self.settings.os == "Windows":
self.requires("vulkan-headers/1.3.290.0")

self.requires("joltphysics/1.0")

self.requires("vulkan-headers/1.3.290.0")
if self.settings.os == "Linux":
self.requires("vulkan-loader/1.3.290.0")
print(f"OS = {self.settings.os}")
# self.requires("imguidocking/1.0")
# self.requires("joltphysics/1.0")
# self.requires("assimp/5.4.1")


# Still unsure if I want to use this --- linux specific conan thing.
# def system_requirements(self):
# depending on the platform or the tools.system.package_manager:tool configuration
# only one of these will be executed
Expand Down

0 comments on commit 34d28d3

Please sign in to comment.