Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
d6e9e4d5
Verified
Commit
d6e9e4d5
authored
2 years ago
by
Tobias Frisch
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of gitlab.uni-koblenz.de:vulkan2021/vkcv-framework into develop
parents
5131916b
65abe515
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+3
-0
3 additions, 0 deletions
CMakeLists.txt
scripts/generate.sh
+37
-10
37 additions, 10 deletions
scripts/generate.sh
with
40 additions
and
10 deletions
CMakeLists.txt
+
3
−
0
View file @
d6e9e4d5
...
...
@@ -9,6 +9,9 @@ option(BUILD_DOXYGEN_DOCS "Enables building the VkCV doxygen documentation" OFF)
option
(
BUILD_SHARED
"Enables building VkCV as shared libraries"
OFF
)
option
(
BUILD_VMA_VULKAN_VERSION
"Enforce a specific Vulkan version for VMA"
OFF
)
# uncomment the following line if cmake will refuse to build projects
#set(BUILD_PROJECTS ON)
if
((
WIN32
)
AND
(
NOT BUILD_VMA_VULKAN_VERSION
))
set
(
BUILD_VMA_VULKAN_VERSION
"1.3.0"
)
endif
()
...
...
This diff is collapsed.
Click to expand it.
scripts/generate.sh
+
37
−
10
View file @
d6e9e4d5
#!/bin/sh
CMAKE_PROJECT_DIR
=
"
$(
pwd
)
"
if
[
$#
-gt
0
]
;
then
CMAKE_PROJECT_DIR
=
"
$(
realpath
"
$1
"
)
"
mkdir
-p
$CMAKE_PROJECT_DIR
else
CMAKE_PROJECT_DIR
=
"
$(
pwd
)
"
fi
CMAKE_PROJECT_NAME
=
"
$(
basename
"
$CMAKE_PROJECT_DIR
"
)
"
# Navigate to the main directory of the cloned repository
...
...
@@ -8,6 +14,12 @@ cd ..
CMAKE_FRAMEWORK_DIR
=
"
$(
realpath
-s
--relative-to
=
"
$CMAKE_PROJECT_DIR
"
"
$(
pwd
)
"
)
"
if
[
"
$CMAKE_FRAMEWORK_DIR
"
==
"../.."
]
;
then
IS_INTERNAL_PROJECT
=
true
else
IS_INTERNAL_PROJECT
=
false
fi
# Navigate back to the project directory
cd
"
$CMAKE_PROJECT_DIR
"
||
exit
...
...
@@ -21,16 +33,26 @@ generate_cmake_lists() {
echo
"set(CMAKE_CXX_STANDARD 20)"
echo
"set(CMAKE_CXX_STANDARD_REQUIRED ON)"
echo
echo
"set(BUILD_MODULES ON CACHE INTERNAL
\"\"
)"
echo
"set(BUILD_PROJECTS OFF CACHE INTERNAL
\"\"
)"
echo
"set(BUILD_DOXYGEN_DOCS OFF CACHE INTERNAL
\"\"
)"
echo
"set(BUILD_SHARED OFF CACHE INTERNAL
\"\"
)"
echo
"add_subdirectory(
$CMAKE_FRAMEWORK_DIR
)"
echo
if
test
"
$IS_INTERNAL_PROJECT
"
=
false
;
then
echo
"set(BUILD_MODULES ON CACHE INTERNAL
\"\"
)"
echo
"set(BUILD_PROJECTS OFF CACHE INTERNAL
\"\"
)"
echo
"set(BUILD_DOXYGEN_DOCS OFF CACHE INTERNAL
\"\"
)"
echo
"set(BUILD_SHARED OFF CACHE INTERNAL
\"\"
)"
echo
"add_subdirectory(
$CMAKE_FRAMEWORK_DIR
)"
echo
fi
echo
"add_executable(
$CMAKE_PROJECT_NAME
src/main.cpp)"
echo
echo
"target_include_directories(
$CMAKE_PROJECT_NAME
SYSTEM BEFORE PRIVATE
\$
{vkcv_includes})"
echo
"target_link_libraries(
$CMAKE_PROJECT_NAME
\$
{vkcv_libraries})"
if
test
"
$IS_INTERNAL_PROJECT
"
=
true
;
then
echo
"target_include_directories(
$CMAKE_PROJECT_NAME
SYSTEM BEFORE PRIVATE
\$
{vkcv_include}
\$
{vkcv_includes})"
echo
"target_link_libraries(
$CMAKE_PROJECT_NAME
vkcv
\$
{vkcv_libraries})"
else
echo
"target_include_directories(
$CMAKE_PROJECT_NAME
SYSTEM BEFORE PRIVATE
\$
{vkcv_includes})"
echo
"target_link_libraries(
$CMAKE_PROJECT_NAME
\$
{vkcv_libraries})"
fi
}
generate_main_cpp
()
{
...
...
@@ -44,7 +66,12 @@ generate_main_cpp() {
echo
" { VK_KHR_SWAPCHAIN_EXTENSION_NAME }"
echo
" );"
echo
" "
echo
" vkcv::WindowHandle windowHandle = core.createWindow(
\"
$CMAKE_PROJECT_NAME
\"
, 800, 600, true);"
echo
" vkcv::WindowHandle windowHandle = core.createWindow("
echo
"
\"
$CMAKE_PROJECT_NAME
\"
,"
echo
" 800,"
echo
" 600,"
echo
" true"
echo
" );"
echo
" "
echo
" while (vkcv::Window::hasOpenWindow()) {"
echo
" vkcv::Window::pollEvents();"
...
...
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