--- a/hedgewars/CMakeLists.txt Wed May 16 18:22:28 2018 +0200
+++ b/hedgewars/CMakeLists.txt Wed Jul 31 23:14:27 2019 +0200
@@ -52,6 +52,7 @@
uConsole.pas
uCommands.pas
uDebug.pas
+ uKeyNames.pas
uInputHandler.pas
uTextures.pas
uRenderUtils.pas
@@ -164,17 +165,10 @@
add_flag_append(CMAKE_Pascal_FLAGS "-XLAlua=${lua_output_name}")
endif()
-if(PHYSFS_SYSTEM)
- get_filename_component(PHYSFS_LIBRARY_DIR ${PHYSFS_LIBRARY} PATH)
- add_flag_append(CMAKE_Pascal_FLAGS "-Fl${PHYSFS_LIBRARY}")
-else()
- add_definitions(-dPHYSFS_INTERNAL)
- list(APPEND HW_LINK_LIBS physfs)
- #-XLA is a beta fpc flag that renames libraries before passing them to the linker
- #we also have to pass PHYSFS_INTERNAL to satisfy windows runtime requirements
- #(should be harmless on other platforms)
- add_flag_append(CMAKE_Pascal_FLAGS "-XLAphysfs=${physfs_output_name}")
-endif()
+# PhysFS
+get_filename_component(PHYSFS_LIBRARY_DIR ${PHYSFS_LIBRARY} PATH)
+add_flag_append(CMAKE_Pascal_FLAGS "-Fl${PHYSFS_LIBRARY}")
+
list(APPEND HW_LINK_LIBS physlayer)
@@ -193,6 +187,10 @@
list(APPEND sourcefiles_sofar "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
endforeach(loop_var)
+if (WIN32 AND VCPKG_TOOLCHAIN)
+ add_definitions(-dWIN32_VCPKG)
+endif()
+
#SOURCE AND PROGRAMS SECTION
if(BUILD_ENGINE_LIBRARY)