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
Game Development
Game Library
Commits
c870f6d2
Commit
c870f6d2
authored
2 years ago
by
Joseph Walton-Rivers
Browse files
Options
Downloads
Patches
Plain Diff
fix error with glfw import
parent
3e5b6b4a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#3317
failed
2 years ago
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CMakeLists.txt
+3
-9
3 additions, 9 deletions
CMakeLists.txt
build.sh
+9
-12
9 additions, 12 deletions
build.sh
demo/CMakeLists.txt
+2
-1
2 additions, 1 deletion
demo/CMakeLists.txt
fggl/CMakeLists.txt
+0
-1
0 additions, 1 deletion
fggl/CMakeLists.txt
fggl/gfx/CMakeLists.txt
+5
-2
5 additions, 2 deletions
fggl/gfx/CMakeLists.txt
with
19 additions
and
25 deletions
CMakeLists.txt
+
3
−
9
View file @
c870f6d2
...
...
@@ -28,6 +28,7 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
cmake_find_package
cmake_find_package_multi
OPTIONS
glfw:shared=True
glad:gl_profile=core
glad:gl_version=4.5
glad:extensions=
"GL_ARB_get_program_binary"
...
...
@@ -51,8 +52,6 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
)
endif
()
execute_process
(
COMMAND ls
${
CMAKE_BINARY_DIR
}
)
# testing support
include
(
CTest
)
...
...
@@ -81,13 +80,6 @@ endif()
# end windows support
##
set
(
FGGL_WAYLAND True
)
include
(
GNUInstallDirs
)
# depedencies
# engine
#add_subdirectory(vendor/imgui/)
...
...
@@ -101,6 +93,8 @@ add_subdirectory(demo)
# INSTALL PHASE
# see https://decovar.dev/blog/2021/03/08/cmake-cpp-library/
##
include
(
GNUInstallDirs
)
file
(
GLOB_RECURSE public_headers
${
PROJECT_SOURCE_DIR
}
/include/
${
PROJECT_NAME
}
/*.hpp
${
PROJECT_SOURCE_DIR
}
/include/
${
PROJECT_NAME
}
/*.h
...
...
This diff is collapsed.
Click to expand it.
build.sh
+
9
−
12
View file @
c870f6d2
...
...
@@ -2,13 +2,9 @@
CACHE
=
/tmp/fggl/
LOG
=
$CACHE
/demo.log
EXE
=
"../builds/cli/bin/FgglDemo"
# check build directory exists
if
[[
!
-d
"builds/cli/"
]]
then
mkdir
-p
builds/cli
fi
BUILD_PATH
=
"builds/cli"
DEMO_EXE
=
"
$PWD
/
$BUILD_PATH
/demo/FgglDemo"
# check cmake exists
if
[
!
-x
"
$(
command
-v
cmake
)
"
]
;
then
...
...
@@ -18,30 +14,31 @@ if [ ! -x "$(command -v cmake)" ]; then
fi
# if doing shader development, disable the cache to make sure changes take affect
rm
-rf
builds/cli
rm
-rf
$CACHE
#
# build step
#
cmake
-S
.
-B
build
-DCMAKE_BUILD_TYPE
=
debug
cmake
--build
build
cmake
-S
.
-B
$BUILD_PATH
-DCMAKE_BUILD_TYPE
=
debug
cmake
--build
$BUILD_PATH
#
# additional stuff
#
EXE
=
"gdb
$EXE
"
#
EXE="gdb $EXE"
# gamemoderun
if
[
-x
"
$(
command
-v
gamemoderun
)
"
]
;
then
EXE
=
"gamemoderun
$EXE
"
DEMO_
EXE
=
"gamemoderun
$
DEMO_
EXE
"
fi
# mangohud
if
[
-x
"
$(
command
-v
mangohud
)
"
]
;
then
EXE
=
"mangohud --dlsym
$EXE
"
DEMO_
EXE
=
"mangohud --dlsym
$
DEMO_
EXE
"
fi
pushd
demo
$EXE
$
DEMO_
EXE
popd
This diff is collapsed.
Click to expand it.
demo/CMakeLists.txt
+
2
−
1
View file @
c870f6d2
# Executable
add_executable
(
FgglDemo main.cpp
)
target_link_libraries
(
FgglDemo fggl
)
target_include_directories
(
FgglDemo PUBLIC
${
PROJECT_BINARY_DIR
}
)
#
target_include_directories(FgglDemo PUBLIC ${PROJECT_BINARY_DIR})
# rssources
file
(
GLOB_RECURSE data data/*
)
...
...
This diff is collapsed.
Click to expand it.
fggl/CMakeLists.txt
+
0
−
1
View file @
c870f6d2
...
...
@@ -60,7 +60,6 @@ target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
# Graphics backend
add_subdirectory
(
gfx
)
target_link_libraries
(
${
PROJECT_NAME
}
PUBLIC glfw
)
# Debug backend
add_subdirectory
(
debug
)
...
...
This diff is collapsed.
Click to expand it.
fggl/gfx/CMakeLists.txt
+
5
−
2
View file @
c870f6d2
# Sources
find_package
(
glfw3 REQUIRED
)
target_link_libraries
(
fggl PUBLIC glfw
)
include
(
CMakePrintHelpers
)
cmake_print_variables
(
GLFW_TARGETS
)
target_link_libraries
(
fggl PUBLIC glfw::glfw
)
target_sources
(
fggl
PRIVATE
...
...
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