Skip to content

Commit

Permalink
Update Windows build-related stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Sep 22, 2018
1 parent 4cc5dbf commit 1991f12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
@@ -1,9 +1,13 @@
cmake_minimum_required (VERSION 3.11)
cmake_minimum_required (VERSION 3.12)
project (BunnymodXT)

set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")

if (MSVC)
if (NOT MSVC_TOOLSET_VERSION MATCHES "141")
message (FATAL_ERROR "Visual Studio 2017 is required")
endif()

# Enable link-time code generation.
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} /GL")
set (CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
Expand Down Expand Up @@ -129,7 +133,7 @@ set (SOURCE_FILES
${CMAKE_CURRENT_BINARY_DIR}/BunnymodXT/git_revision.cpp)

if (MSVC)
include_external_msproject (MinHook "${CMAKE_SOURCE_DIR}/SPTLib/Windows/minhook/build/VC14/libMinHook.vcxproj")
include_external_msproject (MinHook "${CMAKE_SOURCE_DIR}/SPTLib/Windows/minhook/build/VC15/libMinHook.vcxproj")
include_directories ("SPTLib/Windows/minhook/include")
set (SOURCE_FILES ${SOURCE_FILES} ${WINDOWS_FILES} ${HEADER_FILES})
else ()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -59,7 +59,7 @@ Run the following commands, replacing `path\to\boost\base\dir` and `\path\to\rap

Then compile the `ALL_BUILD` project from the generated VS solution.

If you want to make a Windows XP-compatible build, additionally specify `-T v140_xp` (or the equivalent for your Visual Studio version) in the `cmake` command line arguments.
If you want to make a Windows XP-compatible build, additionally specify `-T v141_xp` (or the equivalent for your Visual Studio version) in the `cmake` command line arguments.

### Linux

Expand Down

0 comments on commit 1991f12

Please sign in to comment.