Skip to content

Commit c968ab6

Browse files
committed
Allow cross-compiles on windows via CMake
* We only want to block windows-for-windows builds with CMake, not cross compiles for e.g. android from windows. * We move the fatal error later in the file after the cross-compilation has been initialised so we can check if we're really still WIN32. * This means the early-out on windows is a little late (after some autodetection has happened) but that's not the end of the world.
1 parent abed75a commit c968ab6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
cmake_minimum_required(VERSION 2.8.12)
22

3-
if(WIN32)
4-
message(FATAL_ERROR "CMake is not needed on Windows, just open and build renderdoc.sln")
5-
endif()
6-
73
# disallow in-source builds because we have a top-level wrapper Makefile
84
if(CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
95
message(FATAL_ERROR "In-source builds not allowed")
@@ -34,6 +30,10 @@ option(ENABLE_QRENDERDOC "Enable qrenderdoc" ON)
3430
option(ENABLE_XLIB "Enable xlib windowing support" ON)
3531
option(ENABLE_XCB "Enable xcb windowing support" ON)
3632

33+
if(WIN32)
34+
message(FATAL_ERROR "CMake is not needed on Windows, just open and build renderdoc.sln")
35+
endif()
36+
3737
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
3838
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
3939

0 commit comments

Comments
 (0)