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
34cbdee0
Commit
34cbdee0
authored
2 years ago
by
Joseph Walton-Rivers
Browse files
Options
Downloads
Patches
Plain Diff
provide a way to disable conan support
parent
c870f6d2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+41
-38
41 additions, 38 deletions
CMakeLists.txt
with
41 additions
and
38 deletions
CMakeLists.txt
+
41
−
38
View file @
34cbdee0
cmake_minimum_required
(
VERSION 3.16
)
set
(
namespace
"fggl"
)
option
(
FGGL_CONAN
"Should we use conan to find missing dependencies?"
ON
)
set
(
CONAN_BUILD_TYPE
"Debug"
)
# Define the project
...
...
@@ -13,44 +14,46 @@ project(fggl
if
(
CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME
)
# slightly cleaner conan support
set
(
CMAKE_MODULE_PATH
${
CMAKE_BINARY_DIR
}
${
CMAKE_MODULE_PATH
}
)
set
(
CMAKE_PREFIX_PATH
${
CMAKE_BINARY_DIR
}
${
CMAKE_PREFIX_PATH
}
)
include
(
cmake/conan.cmake
)
conan_cmake_configure
(
REQUIRES
opengl/system
glfw/3.3.7
glad/0.1.35
glm/0.9.9.8
spdlog/1.10.0
GENERATORS
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"
)
if
(
CMAKE_CONFIGURATION_TYPES
)
foreach
(
TYPE
${
CMAKE_CONFIGURATION_TYPES
}
)
conan_cmake_autodetect
(
settings BUILD_TYPE
${
TYPE
}
)
conan_cmake_install
(
PATH_OR_REFERENCE .
BUILD missing
SETTINGS
${
settings
}
)
endforeach
()
else
()
conan_cmake_autodetect
(
settings BUILD_TYPE
${
TYPE
}
)
conan_cmake_install
(
PATH_OR_REFERENCE .
BUILD missing
SETTINGS
${
settings
}
)
endif
()
if
(
FGGL_CONAN
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_BINARY_DIR
}
${
CMAKE_MODULE_PATH
}
)
set
(
CMAKE_PREFIX_PATH
${
CMAKE_BINARY_DIR
}
${
CMAKE_PREFIX_PATH
}
)
include
(
cmake/conan.cmake
)
conan_cmake_configure
(
REQUIRES
opengl/system
glfw/3.3.7
glad/0.1.35
glm/0.9.9.8
spdlog/1.10.0
GENERATORS
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"
)
if
(
CMAKE_CONFIGURATION_TYPES
)
foreach
(
TYPE
${
CMAKE_CONFIGURATION_TYPES
}
)
conan_cmake_autodetect
(
settings BUILD_TYPE
${
TYPE
}
)
conan_cmake_install
(
PATH_OR_REFERENCE .
BUILD missing
SETTINGS
${
settings
}
)
endforeach
()
else
()
conan_cmake_autodetect
(
settings BUILD_TYPE
${
TYPE
}
)
conan_cmake_install
(
PATH_OR_REFERENCE .
BUILD missing
SETTINGS
${
settings
}
)
endif
()
endif
()
# testing support
include
(
CTest
)
...
...
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