Commit 05efd852 authored by Max Lyon's avatar Max Lyon
Browse files

Merge branch 'VCIPaths' into 'master'

add VCIPaths.cmake containing paths to libraries on windows

See merge request !2
parents 4f4210e0 643d9cfb
Pipeline #16311 failed with stage
in 3 seconds
include (MSVCMacros)
include (VCIPaths)
if (EXISTS ${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.cmake)
include (${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.cmake)
endif ()
......
################################################################################
# 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 )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment