From f7186a649335e43c8fa23b97cc756788540cdee9 Mon Sep 17 00:00:00 2001 From: edorax Date: Sat, 11 Feb 2017 13:39:50 +0800 Subject: [PATCH] Move 'dependencies/msvc' inclusion to the CMakeLists.txt in top level. --- CMakeLists.txt | 9 +++++++++ src/wx/CMakeLists.txt | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b7a195b5..eecaca7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,6 +277,15 @@ IF(WIN32) INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/dependencies/mingw-xaudio/include") ENDIF() +IF(MSVC) + SET(DEPS_MSVC "${CMAKE_SOURCE_DIR}/dependencies/msvc") + IF(NOT EXISTS "${DEPS_MSVC}" AND EXISTS "${CMAKE_SOURCE_DIR}/.git") + MESSAGE(FATAL_ERROR "Please pull in git submodules, e.g.\nrun: git submodule update --init --recursive") + ENDIF() + + INCLUDE_DIRECTORIES("${DEPS_MSVC}") # for GL/glext.h +ENDIF(MSVC) + # Compiler flags IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index fb78fcf9..5099a66e 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -149,10 +149,6 @@ ENDIF(WIN32 AND ENABLE_DIRECTX) # contrib widgets include_directories(widgets) -IF(MSVC) - include_directories(../../dependencies/msvc) # for GL/glext.h -ENDIF(MSVC) - # for out-of-tree builds, grab includes from both target and source dirs include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR})