Commit d1914b95 authored by Bastian Krayer's avatar Bastian Krayer
Browse files

initial commit

parents
/BUILD_*/
/INSTALL_*/
*~
*.bak
CMakeLists.txt.user
/Win32
.vs
.idea
.vscode
src/config
/cmake-build-*
/build*
src/cmake-build-*
src/build*
\ No newline at end of file
# General information
This repository contains a basic project setup.
## Adding your own executables
You can add your own executable by creating a folder in *src/executables* and adding your source files. You have to copy the CMakeLists.txt from another executable or write your own. Afterwards rerun cmake.
## Adding your own libraries
You can add your own library by creating a folder in *src/libraries* and adding your source files. For libraries, all headers should be placed in a folder *libraryname/include/libraryname* and all source files in *libraryname/src* You have to copy the CMakeLists.txt from another library or write your own. Afterwards rerun cmake.
## Dependencies
You can specify dependencies by creating a file *depencies.txt* in your project directory. For examples, check the existing executables and libraries.
Dependencies are transitive, so if you include library A, that depends itself on library B, then your project will depend on library B automatically as well.
# IDEs
## Recommended IDEs
### Visual Studio Code
- https://code.visualstudio.com/
- Alternative Build without Microsoft Telemetry: https://github.com/VSCodium/vscodium
### CLion
- (https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
## Other IDEs
### Qt Creator
- https://www.qt.io/offline-installers
- Choose Qt Creator on the left side and download the appropriate binary
### Eclipse
- https://www.eclipse.org/downloads/
- Choose the C/C++ Installation
- Recent versions of Eclipse for C++ have been known to not work properly
# Setup
## Quick setup Mac OS X
Needs more testing!
- install dependencies via homebrew or macports (e.g. ```brew install homebrew/versions/glfw3 glm cmake assimp```)
### Visual Studio Code setup (https://code.visualstudio.com/)
- Install extensions: C/C++ (ms-vscode.cpptools), CMake Tools (ms-vscode.cmake-tools)
- Open the repository's *src* folder in VS Code
- Follow the popup instructions to configure Intellisense
- *Ctrl + p* opens the command bar
- *CMake: Build* will build the project. You will be asked to select the appropriate compiler. Choose the one corresponding to your installation
- *CMake: Run without debugging* will run an executable that you can specify with *CMake: Set Debug Target*
### Clion setup
- download and install [Clion IDE](https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
- click "Check out from Version Control" and clone the repository (```git@gitlab.uni-koblenz.de:cg/ss21cg3.git``` or ```https://gitlab.uni-koblenz.de/cg/ss21cg3.git```)
### Console setup
- install dependencies via homebrew or macports (e.g. ```brew install homebrew/versions/glfw3 glm```)
- clone repository to some place (with ```git clone git@gitlab.uni-koblenz.de:cg/ss21cg3.git``` or ```git clone https://gitlab.uni-koblenz.de/cg/ss21cg3.git```)
- prompt in CVK folder and create a build folder: ```mkdir & cd build```
- run cmake ```cmake ..```
### Qt Creator setup
- Open the *src/CMakeLists.txt* as a project
Happy Coding!
---
## Quick setup Windows
- clone repository to some place
- download the dependencies (https://owncloud.uni-koblenz-landau.de/owncloud/s/AycR2askPsMMsyJ)
- - SetEnvironment.bat sets environment variables: OpenGL_ROOT GLM_ROOT GLFW3_ROOT ASSIMP_ROOT
- **Important**: Supported Compilers are Visual Studio 17/19 and MinGW-w64 (http://mingw-w64.org/doku.php)
- Recommended compiler: Visual Studio 19 (can be downloaded as Visual Studio Build Tools)
- Recommended installation for MinGW: MSys2
- Install CMake https://cmake.org/
### Visual Studio Code setup (https://code.visualstudio.com/)
- Install extensions: C/C++ (ms-vscode.cpptools), CMake Tools (ms-vscode.cmake-tools)
- Open the repository's *src* folder in VS Code
- Follow the popup instructions to configure Intellisense
- *Ctrl + p* opens the command bar
- *CMake: Build* will build the project. You will be asked to select the appropriate compiler. Choose the one corresponding to your installation (e.g. "GCC for x86_64-mingw32 9.2.0" or "Visual Studio Build Tools...")
- *CMake: Run without debugging* will run an executable that you can specify with *CMake: Set Debug Target*
### Clion setup
- download and install [Clion IDE](https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
- Open the file *src/CMakeLists.txt* and choose *Open as Project*
### Qt Creator setup
- Open the *src/CMakeLists.txt* as a project
Happy Coding!
---
## Quick setup Linux (dependencies for ubuntu)
Tested on Ubuntu 18.04 Should work very similar on different distributions
- use your package-manager to install the dependencies (GLM, GLFW, assimp, Xrandr, Xi)
Ubuntu: ```sudo apt-get install libglm-dev libglfw3-dev libassimp-dev libxrandr-dev libxi-dev```
- install CMake either from the site (https://cmake.org/) or from your package manager. It is recommended not to use aptitude, as the cmake version is old.
### Visual Studio Code setup (https://code.visualstudio.com/)
- Install extensions: C/C++ (ms-vscode.cpptools), CMake Tools (ms-vscode.cmake-tools)
- Open the repository's *src* folder in VS Code
- Follow the popup instructions to configure Intellisense
- *Ctrl + p* opens the command bar
- *CMake: Build* will build the project. You will be asked to select the appropriate compiler. Choose the one corresponding to your installation (e.g. something like "GCC for x86_64")
- *CMake: Run without debugging* will run an executable that you can specify with *CMake: Set Debug Target*
- _NOTE_: If you have installed cmake with snap, you may have to go to the CMake Tools settings and put the following in CMake Path: */snap/cmake/current/bin/cmake*
### Clion setup
- download and install [Clion IDE](https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
- click "Check out from Version Control" and clone the repository or open the *src/CmakeLists.txt* from your already cloned repository
### Qt Creator setup
- Open the *src/CMakeLists.txt* as a project
Happy Coding!
---
# Troubleshooting
If on Git clone you are prompted for a password like git@gitlab.com's password: something is wrong with your SSH setup. You can try to clone the repository with the https link (https:://gitlab.uni-koblenz.de/CVK/CVK_2.git)
or you should ...
- ensure that you generated your SSH key pair correctly and added the public SSH key to your GitLab profile
- try manually registering your private SSH key using ssh-agent as documented earlier in this document
- try to debug the connection by running ssh -Tv git@example.com (replacing example.com with your GitLab domain)
More details can be found [here](https://docs.gitlab.com/ce/ssh/README.html).
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
...
cmake_minimum_required(VERSION 3.10)
project(CG3)
LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
# Allows find scripts to automatically search in environment variables LIBNAME_ROOT
cmake_policy(SET CMP0074 NEW)
ENDIF()
# Determine if 64 Bit build
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
SET(BUILD_TYPE_64_BIT true)
endif()
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
SET(BUILD_TYPE_64_BIT true)
endif()
if(CMAKE_CL_64)
SET(BUILD_TYPE_64_BIT true)
endif()
IF(BUILD_TYPE_64_BIT)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
ENDIF()
include(ProjectSetup)
\ No newline at end of file
cmake_minimum_required(VERSION 3.16)
get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME)
string(REPLACE " " "_" ProjectId ${ProjectId})
project(${ProjectId})
# Enables the CMake policy to use environment variables {LIBNAME}_ROOT to search for libraries
EnableCmakeLibEnvironmentRoot()
# Creates an executable from all source and header files in the current directory
# This will also find all dependencies specified in the depdencies.txt and
# link them privately
CreateExecutable(${ProjectId})
# Add default dependencies with private visibility, since it is an executable
AddDefaultDependencies(${ProjectId} PRIVATE)
\ No newline at end of file
cmake_minimum_required(VERSION 3.16)
get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME)
string(REPLACE " " "_" ProjectId ${ProjectId})
project(${ProjectId})
# Enables the CMake policy to use environment variables {LIBNAME}_ROOT to search for libraries
EnableCmakeLibEnvironmentRoot()
# Creates a library from all source and header files in the current directory
# This will also find all dependencies specified in the depdencies.txt and
# link them publicly
# If it is a header only library, an interface library is created so that cmake
# can process it correctly. In that case IS_INTERFACE is set to true. Further
# linking can use that information accordingly
CreateLibrary(${ProjectId} IS_INTERFACE)
# Add default dependencies. Visibility is set whether we are dealing with a
# normal or a header only library
IF (${IS_INTERFACE})
AddDefaultDependencies(${ProjectId} INTERFACE)
ELSE ()
AddDefaultDependencies(${ProjectId} PRIVATE)
ENDIF ()
\ No newline at end of file
#
# Try to find Assimp library and include path.
# Once done this will define
#
# ASSIMP_FOUND
# ASSIMP_INCLUDE_PATH
# ASSIMP_LIBRARIES
# ASSIMP_BINARIES
#
# It will add the assimp DLL for windows builds to PROJECT_RUNTIME_LIBRARIES
IF(DEFINED ENV{ASSIMP_ROOT})
file(TO_CMAKE_PATH $ENV{ASSIMP_ROOT} ASSIMP_ROOT_ENV)
ENDIF()
# For older cmake versions use root variable as additional search directory explicitly
IF(${CMAKE_VERSION} VERSION_LESS_EQUAL "3.12.0")
SET(ASSIMP_ADDITIONAL_SEARCH_DIRS ${ASSIMP_ROOT_ENV})
ENDIF()
IF(APPLE)
set(ASSIMP_ROOT_ENV $ENV{CVK_DEPENDENCIES_OSX}/assimp/)
ENDIF(APPLE)
if (WIN32)
IF (MINGW)
SET(ASSIMP_SEARCH_PATH_SUFFIX mingw)
SET(ASSIMP_LIB_NAME libassimp)
ELSEIF (MSVC)
# MSVC toolset suffix
# Checks for version
SET(ASSIMP_MSCV_LIB_POSTFIX "")
IF(MSVC_TOOLSET_VERSION EQUAL 140 OR MSVC_VERSION EQUAL 1900)
SET(ASSIMP_SEARCH_PATH_SUFFIX "msvc140")
SET(ASSIMP_MSCV_LIB_POSTFIX "-vc140-mt")
ELSEIF(MSVC_TOOLSET_VERSION EQUAL 141 OR
(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919) )
SET(ASSIMP_SEARCH_PATH_SUFFIX "msvc141")
SET(ASSIMP_MSCV_LIB_POSTFIX "-vc140-mt")
ELSE()
SET(ASSIMP_SEARCH_PATH_SUFFIX "msvc141")
SET(ASSIMP_MSCV_LIB_POSTFIX "-vc140-mt") # good luck
ENDIF()
SET(ASSIMP_LIB_NAME "assimp${ASSIMP_MSCV_LIB_POSTFIX}")
ENDIF()
find_library(ASSIMP_LIBRARY_RELEASE
NAMES ${ASSIMP_LIB_NAME}
PATHS
${ASSIMP_ADDITIONAL_SEARCH_DIRS}
PATH_SUFFIXES ${ASSIMP_SEARCH_PATH_SUFFIX}/lib
)
find_library(ASSIMP_LIBRARY_DEBUG
NAMES "${ASSIMP_LIB_NAME}d"
PATHS
${ASSIMP_ADDITIONAL_SEARCH_DIRS}
PATH_SUFFIXES ${ASSIMP_SEARCH_PATH_SUFFIX}/lib
)
FIND_PATH(ASSIMP_INCLUDE_DIR assimp/ai_assert.h
PATHS
${ASSIMP_ADDITIONAL_SEARCH_DIRS}
PATH_SUFFIXES ${ASSIMP_SEARCH_PATH_SUFFIX}/include
)
include(SelectLibraryConfigurations)
select_library_configurations(ASSIMP)
# Determine if 64 Bit build
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)" OR "${CMAKE_SIZEOF_VOID_P}" STREQUAL "8" OR CMAKE_CL_64)
SET(ASSIMP_BINARY_SEARCH_POSTFIX "64")
endif()
FILE(GLOB ASSIMP_BINARIES "${ASSIMP_INCLUDE_DIR}/../bin${ASSIMP_BINARY_SEARCH_POSTFIX}/*.dll")
if(NOT ASSIMP_LIBRARY_RELEASE)
set(ASSIMP_LIBRARY_RELEASE "ASSIMP_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
endif()
if(NOT ASSIMP_LIBRARY_DEBUG)
set(ASSIMP_LIBRARY_DEBUG "ASSIMP_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.")
endif()
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if( ASSIMP_LIBRARY_DEBUG AND ASSIMP_LIBRARY_RELEASE AND
NOT ASSIMP_LIBRARY_DEBUG STREQUAL ASSIMP_LIBRARY_RELEASE AND
( _isMultiConfig OR CMAKE_BUILD_TYPE ) )
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
# single-config generators, set optimized and debug libraries
set( ASSIMP_INTERFACE_LIBRARY "" )
foreach( _libname IN LISTS ASSIMP_LIBRARY_RELEASE )
list( APPEND ASSIMP_INTERFACE_LIBRARY $<$<CONFIG:RelWithDebInfo>:${_libname}> )
list( APPEND ASSIMP_INTERFACE_LIBRARY $<$<CONFIG:Release>:${_libname}> )
list( APPEND ASSIMP_INTERFACE_LIBRARY $<$<CONFIG:MinSizeRel>:${_libname}> )
#list( APPEND GLFW3_LIBRARY ${_libname} )
endforeach()
foreach( _libname IN LISTS ASSIMP_LIBRARY_DEBUG )
list( APPEND ASSIMP_INTERFACE_LIBRARY $<$<CONFIG:Debug>:${_libname}> )
endforeach()
elseif( ASSIMP_LIBRARY_RELEASE )
set( ASSIMP_INTERFACE_LIBRARY ${ASSIMP_LIBRARY_RELEASE} )
elseif( ASSIMP_LIBRARY_DEBUG )
set( ASSIMP_INTERFACE_LIBRARY ${ASSIMP_LIBRARY_DEBUG} )
else()
set( ASSIMP_INTERFACE_LIBRARY "ASSIMP_LIBRARY-NOTFOUND")
endif()
ELSEIF(APPLE)
FIND_PATH(ASSIMP_INCLUDE_PATH assimp/defs.h
PATHS
${ASSIMP_ADDITIONAL_SEARCH_DIRS}
${ASSIMP_ROOT_ENV}/include)
FIND_LIBRARY( ASSIMP_LIBRARY
NAMES libassimp.a libassimp.dylib
PATHS
${ASSIMP_ROOT_ENV}/lib
${ASSIMP_ADDITIONAL_SEARCH_DIRS})
SET(ASSIMP_LIBRARY z ${ASSIMP_LIBRARY})
ELSE()
FIND_PATH(ASSIMP_INCLUDE_PATH assimp/defs.h
PATHS ${ASSIMP_ADDITIONAL_SEARCH_DIRS}
)
FIND_LIBRARY(ASSIMP_LIBRARY
NAMES assimp
PATHS
${ASSIMP_ADDITIONAL_SEARCH_DIRS}
PATH_SUFFIXES dynamic)
ENDIF ()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ASSIMP
REQUIRED_VARS ASSIMP_INCLUDE_DIR ASSIMP_LIBRARY)
set(ASSIMP_INCLUDE_DIRS ${ASSIMP_INCLUDE_DIR})
if(ASSIMP_FOUND AND NOT TARGET Assimp::Assimp)
add_library(Assimp::Assimp INTERFACE IMPORTED)
IF(NOT ASSIMP_INTERFACE_LIBRARY)
SET(ASSIMP_INTERFACE_LIBRARY ${ASSIMP_LIBRARIES})
ENDIF()
set_target_properties(Assimp::Assimp PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ASSIMP_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${ASSIMP_INTERFACE_LIBRARY}"
)
endif()
\ No newline at end of file
#
# Try to find GLFW3 library and include path.
# Once done this will define
#
# GLFW3_FOUND
# GLFW3_INCLUDE_PATH
# GLFW3_LIBRARIES
#
IF(DEFINED ENV{GLFW3_ROOT})
file(TO_CMAKE_PATH $ENV{GLFW3_ROOT} GLFW3_ROOT_ENV)
ENDIF()
# For older cmake versions use root variable as additional search directory explicitly
IF(${CMAKE_VERSION} VERSION_LESS_EQUAL "3.12.0")
SET(GLFW_ADDITIONAL_SEARCH_DIRS ${GLFW3_ROOT_ENV})
ENDIF()
if (WIN32)
IF (MINGW)
SET(GLFW_SEARCH_PATH_SUFFIX mingw)
SET(GLFW_LIB_NAME libglfw3)
ELSEIF (MSVC)
# MSVC toolset suffix
# Checks for version
IF(MSVC_TOOLSET_VERSION EQUAL 140 OR MSVC_VERSION EQUAL 1900)
SET(GLFW_SEARCH_PATH_SUFFIX "msvc140")
ELSEIF(MSVC_TOOLSET_VERSION EQUAL 141 OR
(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919) )
SET(GLFW_SEARCH_PATH_SUFFIX "msvc141")
ELSE()
SET(GLFW_SEARCH_PATH_SUFFIX "msvc141") # good luck
ENDIF()
SET(GLFW_LIB_NAME glfw3)
ENDIF()
find_library(GLFW3_LIBRARY_RELEASE
NAMES ${GLFW_LIB_NAME}
PATHS
${GLFW_ADDITIONAL_SEARCH_DIRS}
PATH_SUFFIXES
${GLFW_SEARCH_PATH_SUFFIX}
${GLFW_SEARCH_PATH_SUFFIX}/lib
)
find_library(GLFW3_LIBRARY_DEBUG
NAMES "${GLFW_LIB_NAME}d"
PATHS
${GLFW_ADDITIONAL_SEARCH_DIRS}
PATH_SUFFIXES
${GLFW_SEARCH_PATH_SUFFIX}
${GLFW_SEARCH_PATH_SUFFIX}/lib
)
FIND_PATH(GLFW3_INCLUDE_DIR GLFW/glfw3.h
PATHS
${GLFW_ADDITIONAL_SEARCH_DIRS}
PATH_SUFFIXES ${GLFW_SEARCH_PATH_SUFFIX}/include
)
include(SelectLibraryConfigurations)
select_library_configurations(GLFW3)
if(NOT GLFW3_LIBRARY_RELEASE)
set(GLFW3_LIBRARY_RELEASE "GLFW3_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
endif()
if(NOT GLFW3_LIBRARY_DEBUG)
set(GLFW3_LIBRARY_DEBUG "GLFW3_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.")
endif()
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if( GLFW3_LIBRARY_DEBUG AND GLFW3_LIBRARY_RELEASE AND
NOT GLFW3_LIBRARY_DEBUG STREQUAL GLFW3_LIBRARY_RELEASE AND
( _isMultiConfig OR CMAKE_BUILD_TYPE ) )
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
# single-config generators, set optimized and debug libraries
set( GLFW3_INTERFACE_LIBRARY "" )
foreach( _libname IN LISTS GLFW3_LIBRARY_RELEASE )
list( APPEND GLFW3_INTERFACE_LIBRARY $<$<CONFIG:RelWithDebInfo>:${_libname}> )
list( APPEND GLFW3_INTERFACE_LIBRARY $<$<CONFIG:Release>:${_libname}> )
list( APPEND GLFW3_INTERFACE_LIBRARY $<$<CONFIG:MinSizeRel>:${_libname}> )
#list( APPEND GLFW3_LIBRARY ${_libname} )
endforeach()
foreach( _libname IN LISTS GLFW3_LIBRARY_DEBUG )
list( APPEND GLFW3_INTERFACE_LIBRARY $<$<CONFIG:Debug>:${_libname}> )
endforeach()