Commit 2b49ddfa authored by Jan Möbius's avatar Jan Möbius
Browse files

Updated cmake finders and gitlab file to support apps on VS2017

parent 801a5698
...@@ -44,29 +44,30 @@ cppcheck: ...@@ -44,29 +44,30 @@ cppcheck:
paths: paths:
- cppcheck.log - cppcheck.log
.VS2015-32-bit-shared-apps: VS2017-32-bit-shared-apps:
variables: variables:
BUILD_PLATFORM: "VS2015" BUILD_PLATFORM: "VS2017"
ARCHITECTURE: "x32" ARCHITECTURE: "x32"
SHARED: "TRUE" SHARED: "TRUE"
APPS: "ON" APPS: "ON"
script: "CI\\Windows.bat" script: "CI\\Windows.bat"
tags: tags:
- VS2015 - VS2017
- Qt5101
artifacts: artifacts:
paths: paths:
- build-release/*.exe - build-release/*.exe
VS2017-32-bit-static-apps:
.VS2015-32-bit-static-apps:
variables: variables:
BUILD_PLATFORM: "VS2015" BUILD_PLATFORM: "VS2017"
ARCHITECTURE: "x32" ARCHITECTURE: "x32"
SHARED: "FALSE" SHARED: "FALSE"
APPS: "ON" APPS: "ON"
script: "CI\\Windows.bat" script: "CI\\Windows.bat"
tags: tags:
- VS2015 - VS2017
- Qt5101
artifacts: artifacts:
paths: paths:
- build-release/*.exe - build-release/*.exe
...@@ -81,6 +82,7 @@ VS2017-64-bit-shared-apps: ...@@ -81,6 +82,7 @@ VS2017-64-bit-shared-apps:
script: "CI\\Windows.bat" script: "CI\\Windows.bat"
tags: tags:
- VS2017 - VS2017
- Qt5101
artifacts: artifacts:
paths: paths:
- build-release/*.exe - build-release/*.exe
...@@ -94,6 +96,7 @@ VS2017-64-bit-static-apps: ...@@ -94,6 +96,7 @@ VS2017-64-bit-static-apps:
script: "CI\\Windows.bat" script: "CI\\Windows.bat"
tags: tags:
- VS2017 - VS2017
- Qt5101
artifacts: artifacts:
paths: paths:
- build-release/*.exe - build-release/*.exe
......
...@@ -32,6 +32,10 @@ if( WIN32 ) ...@@ -32,6 +32,10 @@ if( WIN32 )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/")
endif() endif()
if( MSVC80 ) if( MSVC80 )
...@@ -45,7 +49,9 @@ if( WIN32 ) ...@@ -45,7 +49,9 @@ if( WIN32 )
PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/include" PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/include"
"${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/include" "${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/include"
${COMPILER_PATH}/PlatformSDK/Include ${COMPILER_PATH}/PlatformSDK/Include
"${VS_SEARCH_PATH}glew-1.10.0/include") "${VS_SEARCH_PATH}glew-2.0.0/include"
"${VS_SEARCH_PATH}glew-1.10.0/include"
"${VS_SEARCH_PATH}glew-1.13.0/include")
SET( GLEW_NAMES glew32 ) SET( GLEW_NAMES glew32 )
FIND_LIBRARY( GLEW_LIBRARY FIND_LIBRARY( GLEW_LIBRARY
...@@ -53,7 +59,9 @@ if( WIN32 ) ...@@ -53,7 +59,9 @@ if( WIN32 )
PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/lib" PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/lib"
"${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/lib" "${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/lib"
${COMPILER_PATH}/PlatformSDK/Lib ${COMPILER_PATH}/PlatformSDK/Lib
"${VS_SEARCH_PATH}glew-1.10.0/lib" ) "${VS_SEARCH_PATH}glew-2.0.0/lib"
"${VS_SEARCH_PATH}glew-1.10.0/lib"
"${VS_SEARCH_PATH}glew-1.13.0/lib" )
else( WIN32 ) else( WIN32 )
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h GL/wglew.h FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h GL/wglew.h
......
...@@ -40,6 +40,10 @@ IF (WIN32) ...@@ -40,6 +40,10 @@ IF (WIN32)
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/")
endif() endif()
...@@ -49,7 +53,17 @@ IF (WIN32) ...@@ -49,7 +53,17 @@ IF (WIN32)
"${VS_SEARCH_PATH}/freeglut-3.0.0/include" "${VS_SEARCH_PATH}/freeglut-3.0.0/include"
"${VS_SEARCH_PATH}/freeglut-2.8.1/include" ) "${VS_SEARCH_PATH}/freeglut-2.8.1/include" )
FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut32 glut freeglut FIND_LIBRARY( GLUT_release_LIBRARY NAMES glut32 glut freeglut
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release
"${CMAKE_WINDOWS_LIBS_DIR}/glut-3.7/lib"
"${VS_SEARCH_PATH}/freeglut-3.0.0/lib"
"${VS_SEARCH_PATH}/freeglut-2.8.1/lib"
)
GET_FILENAME_COMPONENT( GLUT_LIBRARY_DIR ${GLUT_release_LIBRARY} PATH )
FIND_LIBRARY( GLUT_debug_LIBRARY NAMES glut32d glutd freeglutd
PATHS PATHS
${OPENGL_LIBRARY_DIR} ${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release ${GLUT_ROOT_PATH}/Release
...@@ -58,7 +72,7 @@ IF (WIN32) ...@@ -58,7 +72,7 @@ IF (WIN32)
"${VS_SEARCH_PATH}/freeglut-2.8.1/lib" "${VS_SEARCH_PATH}/freeglut-2.8.1/lib"
) )
GET_FILENAME_COMPONENT( GLUT_LIBRARY_DIR ${GLUT_glut_LIBRARY} PATH ) set(GLUT_glut_LIBRARY optimized ${GLUT_release_LIBRARY} debug ${GLUT_debug_LIBRARY})
ELSE (WIN32) ELSE (WIN32)
...@@ -99,9 +113,12 @@ ENDIF (WIN32) ...@@ -99,9 +113,12 @@ ENDIF (WIN32)
SET( GLUT_FOUND "NO" ) SET( GLUT_FOUND "NO" )
IF(GLUT_INCLUDE_DIR) IF(GLUT_INCLUDE_DIR)
IF(GLUT_glut_LIBRARY) IF(GLUT_glut_LIBRARY)
# Is -lXi and -lXmu required on all platforms that have it?
# If not, we need some way to figure out what platform we are on.
SET( GLUT_LIBRARIES SET( GLUT_LIBRARIES
${GLUT_glut_LIBRARY} ${GLUT_glut_LIBRARY}
${GLUT_Xmu_LIBRARY}
${GLUT_Xi_LIBRARY}
${GLUT_cocoa_LIBRARY} ${GLUT_cocoa_LIBRARY}
) )
SET( GLUT_FOUND "YES" ) SET( GLUT_FOUND "YES" )
......
...@@ -59,7 +59,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES) ...@@ -59,7 +59,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
/ACG/acgdev/gcc-x86_64/gtest/lib /ACG/acgdev/gcc-x86_64/gtest/lib
/opt/local/lib /opt/local/lib
/usr/local/lib /usr/local/lib
/usr/lib /usr/include
"C:/libs/win32/gtest/lib" "C:/libs/win32/gtest/lib"
NO_DEFAULT_PATH ) NO_DEFAULT_PATH )
find_library(_GTEST_MAIN_LIBRARY gtest_main find_library(_GTEST_MAIN_LIBRARY gtest_main
...@@ -70,7 +70,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES) ...@@ -70,7 +70,7 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
/ACG/acgdev/gcc-x86_64/gtest/lib /ACG/acgdev/gcc-x86_64/gtest/lib
/opt/local/lib /opt/local/lib
/usr/local/lib /usr/local/lib
/usr/lib /usr/include
"C:/libs/win32/gtest/lib" "C:/libs/win32/gtest/lib"
NO_DEFAULT_PATH ) NO_DEFAULT_PATH )
...@@ -84,24 +84,29 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES) ...@@ -84,24 +84,29 @@ else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
set(GTEST_INCLUDE_DIRS ${_GTEST_INCLUDE_DIR} CACHE PATH set(GTEST_INCLUDE_DIRS ${_GTEST_INCLUDE_DIR} CACHE PATH
"Include directories for Google Test framework") "Include directories for Google Test framework")
if ( NOT WIN32 ) if ( NOT WIN32 )
set(GTEST_LIBRARIES ${_GTEST_LIBRARY} CACHE FILEPATH set(GTEST_LIBRARIES ${_GTEST_LIBRARY} CACHE FILEPATH
"Libraries to link for Google Test framework") "Libraries to link for Google Test framework")
set(GTEST_MAIN_LIBRARIES ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH set(GTEST_MAIN_LIBRARIES ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH
"Libraries to link for Google Test automatic main() definition") "Libraries to link for Google Test automatic main() definition")
else() set(GTEST_MAIN_LIBRARY ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH
set(GTEST_LIBRARIES "optimized;gtest;debug;gtestd" CACHE FILEPATH "Libraries to link for Google Test automatic main() definition")
else()
set(GTEST_LIBRARIES "optimized;gtest;debug;gtestd" CACHE FILEPATH
"Libraries to link for Google Test framework") "Libraries to link for Google Test framework")
set(GTEST_MAIN_LIBRARIES "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH set(GTEST_MAIN_LIBRARIES "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH
"Libraries to link for Google Test automatic main() definition") "Libraries to link for Google Test automatic main() definition")
endif() set(GTEST_MAIN_LIBRARY "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH
"Libraries to link for Google Test automatic main() definition")
endif()
# Macro required to use google test with vs2012 # Macro required to use google test with vs2012
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" ) if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
add_definitions(-D_VARIADIC_MAX=10) add_definitions(-D_VARIADIC_MAX=10)
endif() endif()
set(GTEST_LIBRARY ${_GTEST_LIBRARY} CACHE FILEPATH
"GTest Libraries")
set(GTEST_LIBRARY_DIR ${_GTEST_LIBRARY_DIR} CACHE FILEPATH set(GTEST_LIBRARY_DIR ${_GTEST_LIBRARY_DIR} CACHE FILEPATH
"Library dir containing Google Test libraries") "Library dir containing Google Test libraries")
mark_as_advanced(GTEST_INCLUDE_DIRS GTEST_LIBRARIES GTEST_MAIN_LIBRARIES GTEST_LIBRARY_DIR ) mark_as_advanced(GTEST_INCLUDE_DIRS GTEST_LIBRARIES GTEST_MAIN_LIBRARIES GTEST_LIBRARY_DIR )
......
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