Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Game Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Onuralp SEZER
Game Library
Commits
2bf969e5
Commit
2bf969e5
authored
2 years ago
by
Joseph Walton-Rivers
Browse files
Options
Downloads
Patches
Plain Diff
hack opengl and glfw detection for windows
parent
6a4e91ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+14
-6
14 additions, 6 deletions
CMakeLists.txt
fggl/CMakeLists.txt
+1
-0
1 addition, 0 deletions
fggl/CMakeLists.txt
fggl/gfx/ogl/CMakeLists.txt
+11
-3
11 additions, 3 deletions
fggl/gfx/ogl/CMakeLists.txt
with
26 additions
and
9 deletions
CMakeLists.txt
+
14
−
6
View file @
2bf969e5
...
...
@@ -13,9 +13,6 @@ project(fggl
##
# begin conan support
##
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_BINARY_DIR
}
)
list
(
APPEND CMAKE_PREFIX_PATH
${
CMAKE_BINARY_DIR
}
)
if
(
NOT EXISTS
"
${
CMAKE_BINARY_DIR
}
/conan.cmake"
)
message
(
STATUS
"Downloading conan.cmake from https://github.com/conan-io/cmake-conan"
)
file
(
DOWNLOAD
"https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
...
...
@@ -23,8 +20,12 @@ if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
TLS_VERIFY ON
)
endif
()
include
(
${
CMAKE_BINARY_DIR
}
/conan_paths.cmake
)
include
(
${
CMAKE_BINARY_DIR
}
/conan.cmake
)
include
(
${
CMAKE_BINARY_DIR
}
/conan_paths.cmake
)
#list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
#list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
#conan_cmake_autodetect(settings)
conan_cmake_run
(
CONANFILE conanfile.txt
# or relative build/conanfile.txt
BUILD_TYPE
${
CONAN_BUILD_TYPE
}
...
...
@@ -89,8 +90,15 @@ if (DOXYGEN_FOUND)
endif
(
DOXYGEN_FOUND
)
# depedencies
find_package
(
glfw3 CONFIG REQUIRED
)
target_link_libraries
(
fggl PRIVATE glfw
)
find_package
(
glfw3
)
if
(
GLFW3_FOUND
)
target_link_libraries
(
fggl PRIVATE glfw
)
else
()
message
(
"GLFW couldn't be found - something strange is going on"
)
find_package
(
CONAN_PKG::glfw
)
target_link_libraries
(
fggl PRIVATE glfw
)
endif
()
# engine
#add_subdirectory(vendor/imgui/)
...
...
This diff is collapsed.
Click to expand it.
fggl/CMakeLists.txt
+
1
−
0
View file @
2bf969e5
...
...
@@ -2,6 +2,7 @@
# Config mode dependencies
find_package
(
fmt CONFIG
)
find_package
(
spdlog CONFIG
)
find_package
(
glfw3 CONFIG
)
configure_file
(
FgglConfig.h.in FgglConfig.h
)
...
...
This diff is collapsed.
Click to expand it.
fggl/gfx/ogl/CMakeLists.txt
+
11
−
3
View file @
2bf969e5
...
...
@@ -14,9 +14,17 @@ find_package( glm REQUIRED )
target_link_libraries
(
${
PROJECT_NAME
}
PUBLIC glm::glm
)
# OpenGL Backend
find_package
(
OpenGL REQUIRED
)
include_directories
(
${
OPENGL_INCLUDE_DIR
}
)
target_link_libraries
(
${
PROJECT_NAME
}
PUBLIC OpenGL::OpenGL
)
if
(
WIN32
)
message
(
"There is a hack to make opengl detection work on windows, someone should look into this..."
)
find_package
(
opengl REQUIRED
)
include_directories
(
${
OPENGL_INCLUDE_DIR
}
)
target_link_libraries
(
${
PROJECT_NAME
}
PUBLIC opengl::opengl
)
else
()
find_package
(
OpenGL REQUIRED
)
include_directories
(
${
OPENGL_INCLUDE_DIR
}
)
target_link_libraries
(
${
PROJECT_NAME
}
PUBLIC OpenGL::OpenGL
)
endif
()
# GLEW
find_package
(
glad
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment