Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cmake
cmake-library
Commits
643d9cfb
Commit
643d9cfb
authored
Dec 14, 2020
by
Max Lyon
Browse files
add VCIPaths.cmake containing paths to libraries on windows
parent
4f4210e0
Pipeline
#16310
failed with stage
in 6 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
VCI/VCICommon.cmake
View file @
643d9cfb
include
(
MSVCMacros
)
include
(
VCIPaths
)
if
(
EXISTS
${
CMAKE_SOURCE_DIR
}
/
${
CMAKE_PROJECT_NAME
}
.cmake
)
include
(
${
CMAKE_SOURCE_DIR
}
/
${
CMAKE_PROJECT_NAME
}
.cmake
)
endif
()
...
...
VCI/VCIPaths.cmake
0 → 100644
View file @
643d9cfb
################################################################################
# Custom search paths for libraries
################################################################################
if
(
WIN32
)
find_path
(
VCI_WINDOWS_LIBS_DIR general/README.md
DOC
"Default library search dir for on windows."
HINTS
"C:/libs/"
"D:/libs/"
"E:/libs/"
)
if
(
VCI_WINDOWS_LIBS_DIR
)
# add path to general libs
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/general/"
)
# add path for Visual Studio specific libraries
# TODO: remove VS_SEARCH_PATH when the finders do not depend on it anymore
if
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 11.*Win64"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2012/x64/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2012/x64/"
)
elseif
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 11.*"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2012/x32/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2012/x32/"
)
elseif
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 12.*Win64"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2013/x64/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2013/x64/"
)
elseif
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 12.*"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2013/x32/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2013/x32/"
)
elseif
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 14.*Win64"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2015/x64/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2015/x64/"
)
elseif
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 14.*"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2015/x32/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2015/x32/"
)
elseif
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 15.*Win64"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2017/x64/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2017/x64/"
)
elseif
(
CMAKE_GENERATOR MATCHES
"^Visual Studio 15.*"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
VCI_WINDOWS_LIBS_DIR
}
/vs2017/x32/"
)
SET
(
VS_SEARCH_PATH
"
${
CMAKE_WINDOWS_LIBS_DIR
}
/vs2017/x32/"
)
endif
()
endif
()
endif
(
WIN32
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment