Skip to content

Commit

Permalink
Merge pull request #13 from cginternals/mingw
Browse files Browse the repository at this point in the history
Fix compilation on mingw
  • Loading branch information
Stefan Buschmann authored Apr 18, 2018
2 parents afd7b19 + fc632d6 commit 22d7438
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion cmake/CompileOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
_SCL_SECURE_NO_WARNINGS # Calling any one of the potentially unsafe methods in the Standard C++ Library
_CRT_SECURE_NO_WARNINGS # Calling any one of the potentially unsafe methods in the CRT Library
)
endif ()
endif()

# MINGW
if (MINGW)
set(DEFAULT_COMPILE_DEFINITIONS ${DEFAULT_COMPILE_DEFINITIONS}
WINVER=0x0600
_WIN32_WINNT=0x0600
)
endif()


#
Expand Down
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set(IDE_FOLDER "Examples")
add_subdirectory(examples)

# Tests
if(OPTION_BUILD_TESTS)
if(OPTION_BUILD_TESTS AND NOT MINGW)
set(IDE_FOLDER "Tests")
add_subdirectory(tests)
endif()
Expand Down

0 comments on commit 22d7438

Please sign in to comment.