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
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
No related tags found
No related merge requests found
Changes
5
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)
...
@@ -28,6 +28,7 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
cmake_find_package
cmake_find_package
cmake_find_package_multi
cmake_find_package_multi
OPTIONS
OPTIONS
glfw:shared=True
glad:gl_profile=core
glad:gl_profile=core
glad:gl_version=4.5
glad:gl_version=4.5
glad:extensions=
"GL_ARB_get_program_binary"
glad:extensions=
"GL_ARB_get_program_binary"
...
@@ -51,8 +52,6 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
...
@@ -51,8 +52,6 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
)
)
endif
()
endif
()
execute_process
(
COMMAND ls
${
CMAKE_BINARY_DIR
}
)
# testing support
# testing support
include
(
CTest
)
include
(
CTest
)
...
@@ -81,13 +80,6 @@ endif()
...
@@ -81,13 +80,6 @@ endif()
# end windows support
# end windows support
##
##
set
(
FGGL_WAYLAND True
)
include
(
GNUInstallDirs
)
# depedencies
# engine
# engine
#add_subdirectory(vendor/imgui/)
#add_subdirectory(vendor/imgui/)
...
@@ -101,6 +93,8 @@ add_subdirectory(demo)
...
@@ -101,6 +93,8 @@ add_subdirectory(demo)
# INSTALL PHASE
# INSTALL PHASE
# see https://decovar.dev/blog/2021/03/08/cmake-cpp-library/
# see https://decovar.dev/blog/2021/03/08/cmake-cpp-library/
##
##
include
(
GNUInstallDirs
)
file
(
GLOB_RECURSE public_headers
file
(
GLOB_RECURSE public_headers
${
PROJECT_SOURCE_DIR
}
/include/
${
PROJECT_NAME
}
/*.hpp
${
PROJECT_SOURCE_DIR
}
/include/
${
PROJECT_NAME
}
/*.hpp
${
PROJECT_SOURCE_DIR
}
/include/
${
PROJECT_NAME
}
/*.h
${
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 @@
...
@@ -2,13 +2,9 @@
CACHE
=
/tmp/fggl/
CACHE
=
/tmp/fggl/
LOG
=
$CACHE
/demo.log
LOG
=
$CACHE
/demo.log
EXE
=
"../builds/cli/bin/FgglDemo"
# check build directory exists
BUILD_PATH
=
"builds/cli"
if
[[
!
-d
"builds/cli/"
]]
DEMO_EXE
=
"
$PWD
/
$BUILD_PATH
/demo/FgglDemo"
then
mkdir
-p
builds/cli
fi
# check cmake exists
# check cmake exists
if
[
!
-x
"
$(
command
-v
cmake
)
"
]
;
then
if
[
!
-x
"
$(
command
-v
cmake
)
"
]
;
then
...
@@ -18,30 +14,31 @@ if [ ! -x "$(command -v cmake)" ]; then
...
@@ -18,30 +14,31 @@ if [ ! -x "$(command -v cmake)" ]; then
fi
fi
# if doing shader development, disable the cache to make sure changes take affect
# if doing shader development, disable the cache to make sure changes take affect
rm
-rf
builds/cli
rm
-rf
$CACHE
rm
-rf
$CACHE
#
#
# build step
# build step
#
#
cmake
-S
.
-B
build
-DCMAKE_BUILD_TYPE
=
debug
cmake
-S
.
-B
$BUILD_PATH
-DCMAKE_BUILD_TYPE
=
debug
cmake
--build
build
cmake
--build
$BUILD_PATH
#
#
# additional stuff
# additional stuff
#
#
EXE
=
"gdb
$EXE
"
#
EXE="gdb $EXE"
# gamemoderun
# gamemoderun
if
[
-x
"
$(
command
-v
gamemoderun
)
"
]
;
then
if
[
-x
"
$(
command
-v
gamemoderun
)
"
]
;
then
EXE
=
"gamemoderun
$EXE
"
DEMO_
EXE
=
"gamemoderun
$
DEMO_
EXE
"
fi
fi
# mangohud
# mangohud
if
[
-x
"
$(
command
-v
mangohud
)
"
]
;
then
if
[
-x
"
$(
command
-v
mangohud
)
"
]
;
then
EXE
=
"mangohud --dlsym
$EXE
"
DEMO_
EXE
=
"mangohud --dlsym
$
DEMO_
EXE
"
fi
fi
pushd
demo
pushd
demo
$EXE
$
DEMO_
EXE
popd
popd
This diff is collapsed.
Click to expand it.
demo/CMakeLists.txt
+
2
−
1
View file @
c870f6d2
# Executable
# Executable
add_executable
(
FgglDemo main.cpp
)
add_executable
(
FgglDemo main.cpp
)
target_link_libraries
(
FgglDemo fggl
)
target_link_libraries
(
FgglDemo fggl
)
target_include_directories
(
FgglDemo PUBLIC
${
PROJECT_BINARY_DIR
}
)
#
target_include_directories(FgglDemo PUBLIC ${PROJECT_BINARY_DIR})
# rssources
# rssources
file
(
GLOB_RECURSE data data/*
)
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)
...
@@ -60,7 +60,6 @@ target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
# Graphics backend
# Graphics backend
add_subdirectory
(
gfx
)
add_subdirectory
(
gfx
)
target_link_libraries
(
${
PROJECT_NAME
}
PUBLIC glfw
)
# Debug backend
# Debug backend
add_subdirectory
(
debug
)
add_subdirectory
(
debug
)
...
...
This diff is collapsed.
Click to expand it.
fggl/gfx/CMakeLists.txt
+
5
−
2
View file @
c870f6d2
# Sources
# Sources
find_package
(
glfw3 REQUIRED
)
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
target_sources
(
fggl
PRIVATE
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