Эх сурвалжийг харах

Upgraded minimun CMake version

Iñigo Valentin 1 сар өмнө
parent
commit
20c5ef3900

+ 1 - 0
.gitignore

@@ -24,3 +24,4 @@ doc/FFVII/RAW/
 .cproject
 .cproject
 .directory
 .directory
 v-gears-new*.png
 v-gears-new*.png
+/.vscode/c_cpp_properties.json

+ 2 - 6
CMake/ProjectCommon.cmake

@@ -1,4 +1,3 @@
-## ProjectCommon.cmake
 # Centralized CMake settings used across the V-Gears project.
 # Centralized CMake settings used across the V-Gears project.
 
 
 # Build verbosity default (can be overridden by caller)
 # Build verbosity default (can be overridden by caller)
@@ -20,8 +19,7 @@ if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
   set(CMAKE_DEBUG_POSTFIX "_d")
   set(CMAKE_DEBUG_POSTFIX "_d")
 endif()
 endif()
 
 
-# Multi-config generators should use generator expressions; for single-config
-# generators provide per-configuration output folders as a convenience.
+# Set output directories for binaries and libraries
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/lib)
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/lib)
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/lib)
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/lib)
@@ -33,7 +31,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin_debug/lib)
 # Enable folders in IDEs like Visual Studio
 # Enable folders in IDEs like Visual Studio
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 
-# Make sure our custom CMake modules are discoverable (already appended by top-level)
+# Make custom CMake modules discoverable
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
 
 
 # Create directory for generated headers
 # Create directory for generated headers
@@ -41,5 +39,3 @@ file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/generated")
 
 
 ## Helper: install default GNUInstallDirs if not available
 ## Helper: install default GNUInstallDirs if not available
 include(GNUInstallDirs OPTIONAL)
 include(GNUInstallDirs OPTIONAL)
-
-# Policy: prefer modern targets if project transitions to target-based linking.

+ 1 - 1
CMake/cotire.cmake

@@ -37,7 +37,7 @@ set(__COTIRE_INCLUDED TRUE)
 if (NOT CMAKE_SCRIPT_MODE_FILE)
 if (NOT CMAKE_SCRIPT_MODE_FILE)
 	cmake_policy(PUSH)
 	cmake_policy(PUSH)
 endif()
 endif()
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
 if (NOT CMAKE_SCRIPT_MODE_FILE)
 if (NOT CMAKE_SCRIPT_MODE_FILE)
 	cmake_policy(POP)
 	cmake_policy(POP)
 endif()
 endif()

+ 5 - 5
CMakeLists.txt

@@ -1,7 +1,7 @@
 # Minimum required CMake and project declaration
 # Minimum required CMake and project declaration
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
 # Enable both C and CXX languages so C and C++ toolchains are configured.
 # Enable both C and CXX languages so C and C++ toolchains are configured.
-project(V-Gears VERSION 0.1.18 LANGUAGES C CXX)
+project(V-Gears VERSION 0.1.19 LANGUAGES C CXX)
 
 
 # Provide a central common include for project-wide policies and defaults.
 # Provide a central common include for project-wide policies and defaults.
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
@@ -13,9 +13,9 @@ option(BUILD_INSTALLER "Build the V-Gears-Installer" TRUE)
 option(BUILD_TESTS "Build the unit tests" FALSE)
 option(BUILD_TESTS "Build the unit tests" FALSE)
 option(MULTITHREADING "Enable multithreading" TRUE)
 option(MULTITHREADING "Enable multithreading" TRUE)
 
 
-# Optional hint for Qt configuration dirs. Setting this early helps subprojects
-# (like `src`) locate Qt via config-mode packages when installs are in
-# distro-specific locations. Example: -DQT_DIR_HINT=/usr/lib/x86_64-linux-gnu/cmake
+# Hint for Qt configuration dirs. Setting this early helps subprojects locate
+# Qt via config-mode packages when installs are in distro-specific locations.
+# Example: -DQT_DIR_HINT=/usr/lib/x86_64-linux-gnu/cmake
 set(QT_DIR_HINT "" CACHE PATH "Optional hint for Qt CMake config directory (parent of Qt5/Qt6)")
 set(QT_DIR_HINT "" CACHE PATH "Optional hint for Qt CMake config directory (parent of Qt5/Qt6)")
 if(QT_DIR_HINT)
 if(QT_DIR_HINT)
     list(APPEND CMAKE_PREFIX_PATH "${QT_DIR_HINT}")
     list(APPEND CMAKE_PREFIX_PATH "${QT_DIR_HINT}")

+ 1 - 1
lib/luajit/CMakeLists.txt

@@ -16,7 +16,7 @@ project ( luajit C ASM)
 
 
 set( CMAKE_VERBOSE_MAKEFILE on )
 set( CMAKE_VERBOSE_MAKEFILE on )
 
 
-cmake_minimum_required ( VERSION 3.0 )
+cmake_minimum_required ( VERSION 3.5 )
 include ( cmake/dist.cmake )
 include ( cmake/dist.cmake )
 include ( lua )
 include ( lua )
 
 

+ 166 - 111
src/CMakeLists.txt

@@ -10,9 +10,9 @@ if(NOT DEFINED OGRE_ROOT)
     )
     )
     foreach(_cand IN LISTS _OGRE_CANDIDATES)
     foreach(_cand IN LISTS _OGRE_CANDIDATES)
         if(EXISTS "${_cand}")
         if(EXISTS "${_cand}")
-            # If the candidate points to an include directory like /usr/include/OGRE,
-            # set OGRE_ROOT to the system root (two directories up) so later
-            # searches for modules/libraries can succeed.
+            # If the candidate points to an include directory like
+            # /usr/include/OGRE,set OGRE_ROOT to the system root (two
+            # directories up) so later searches for modules/libraries find it.
             if(_cand MATCHES "/include/OGRE$" OR _cand MATCHES ".*/OGRE$")
             if(_cand MATCHES "/include/OGRE$" OR _cand MATCHES ".*/OGRE$")
                 get_filename_component(_p "${_cand}" DIRECTORY)
                 get_filename_component(_p "${_cand}" DIRECTORY)
                 get_filename_component(_p2 "${_p}" DIRECTORY)
                 get_filename_component(_p2 "${_p}" DIRECTORY)
@@ -28,12 +28,12 @@ endif()
 
 
 
 
 
 
-# Explicitly search for other common libraries if their CMake find modules failed
+# Explicitly search for other common libraries if CMake find modules failed.
 if(NOT OIS_LIBRARIES)
 if(NOT OIS_LIBRARIES)
     find_library(_ois_lib NAMES OIS OIS-1.3.0 libOIS-1.3.0 libOIS HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_ois_lib NAMES OIS OIS-1.3.0 libOIS-1.3.0 libOIS HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     if(_ois_lib)
     if(_ois_lib)
         set(OIS_LIBRARIES ${_ois_lib})
         set(OIS_LIBRARIES ${_ois_lib})
-        message(STATUS "Fallback: Found OIS library: ${_ois_lib}")
+        message(STATUS "Found OIS library: ${_ois_lib}")
     endif()
     endif()
 endif()
 endif()
 
 
@@ -49,7 +49,7 @@ if(NOT TinyXML_LIBRARIES)
     find_library(_tinyxml_lib NAMES tinyxml libtinyxml TinyXML TiXml libtinyxml2 tinyxml2 libtinyxml2 HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_tinyxml_lib NAMES tinyxml libtinyxml TinyXML TiXml libtinyxml2 tinyxml2 libtinyxml2 HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     if(_tinyxml_lib)
     if(_tinyxml_lib)
         set(TinyXML_LIBRARIES ${_tinyxml_lib})
         set(TinyXML_LIBRARIES ${_tinyxml_lib})
-        message(STATUS "Fallback: Found TinyXML library: ${_tinyxml_lib}")
+        message(STATUS "Found TinyXML library: ${_tinyxml_lib}")
     endif()
     endif()
 endif()
 endif()
 
 
@@ -77,7 +77,7 @@ if(NOT OGGVORBIS_LIBRARIES)
     endif()
     endif()
     if(_ov)
     if(_ov)
         set(OGGVORBIS_LIBRARIES ${_ov})
         set(OGGVORBIS_LIBRARIES ${_ov})
-        message(STATUS "Fallback: Found Ogg/Vorbis libraries: ${_ov}")
+        message(STATUS "Found Ogg/Vorbis libraries: ${_ov}")
     endif()
     endif()
 endif()
 endif()
 
 
@@ -86,7 +86,7 @@ foreach(_comp IN ITEMS OgreOverlay OgreBites OgreRTShaderSystem OgreProperty Ogr
     find_library(_comp_lib NAMES ${_comp} lib${_comp} ${_comp}.so HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib ${OGRE_ROOT}/lib)
     find_library(_comp_lib NAMES ${_comp} lib${_comp} ${_comp}.so HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib ${OGRE_ROOT}/lib)
     if(_comp_lib)
     if(_comp_lib)
         list(APPEND OGRE_LIBRARIES ${_comp_lib})
         list(APPEND OGRE_LIBRARIES ${_comp_lib})
-        message(STATUS "Fallback: Found OGRE component ${_comp}: ${_comp_lib}")
+        message(STATUS "Found OGRE component ${_comp}: ${_comp_lib}")
     endif()
     endif()
 endforeach()
 endforeach()
 
 
@@ -103,7 +103,7 @@ if(PKG_CONFIG_FOUND)
                 set(OGRE_ROOT "${_ogre_pkgs.prefix}")
                 set(OGRE_ROOT "${_ogre_pkgs.prefix}")
             endif()
             endif()
             message(STATUS "Found OGRE via pkg-config, OGRE_ROOT=${OGRE_ROOT}")
             message(STATUS "Found OGRE via pkg-config, OGRE_ROOT=${OGRE_ROOT}")
-            # If pkg-config gives us a prefix, try to set CMake module path accordingly
+            # If pkg-config gives a prefix, try to set CMake module path.
             set(_candidate_cm_path "${_ogre_pkgs.prefix}/CMake")
             set(_candidate_cm_path "${_ogre_pkgs.prefix}/CMake")
             if(EXISTS "${_candidate_cm_path}")
             if(EXISTS "${_candidate_cm_path}")
                 set(OGRE_CMAKE_MODULE_PATH "${_candidate_cm_path}")
                 set(OGRE_CMAKE_MODULE_PATH "${_candidate_cm_path}")
@@ -114,17 +114,18 @@ if(PKG_CONFIG_FOUND)
                 endif()
                 endif()
             endif()
             endif()
         endif()
         endif()
-        # Export include dirs and libraries from pkg-config for later target usage
-            set(OGRE_INCLUDE_DIRS ${_ogre_pkgs_INCLUDE_DIRS})
-            # Convert pkg-config library flags (e.g. "-L.. -lOgreMain -lOgreBites")
-            # into a CMake list so target_link_libraries handles them correctly.
-            string(REPLACE " " ";" _pkg_libs_list "${_ogre_pkgs_LIBRARIES}")
-            list(APPEND OGRE_LIBRARIES ${_pkg_libs_list})
+        # Export include dirs and libraries from pkg-config for later usage
+        set(OGRE_INCLUDE_DIRS ${_ogre_pkgs_INCLUDE_DIRS})
+        # Convert pkg-config library flags (e.g. "-L.. -lOgreMain -lOgreBites")
+        # into a CMake list so target_link_libraries handles them correctly.
+        string(REPLACE " " ";" _pkg_libs_list "${_ogre_pkgs_LIBRARIES}")
+        list(APPEND OGRE_LIBRARIES ${_pkg_libs_list})
         set(OGRE_PKG_FOUND TRUE)
         set(OGRE_PKG_FOUND TRUE)
     endif()
     endif()
 endif()
 endif()
 
 
-# If we still don't have OGRE_ROOT, try locating Ogre headers or the OgreMain library directly
+# If OGRE_ROOT is not still yet, try locating Ogre headers or the OgreMain
+# library directly
 if(NOT DEFINED OGRE_ROOT)
 if(NOT DEFINED OGRE_ROOT)
     find_path(_ogre_header Ogre.h HINTS /usr/include/OGRE /usr/include /usr/local/include)
     find_path(_ogre_header Ogre.h HINTS /usr/include/OGRE /usr/include /usr/local/include)
     if(_ogre_header)
     if(_ogre_header)
@@ -143,6 +144,8 @@ if(NOT DEFINED OGRE_ROOT)
     endif()
     endif()
 endif()
 endif()
 
 
+# If OGRE_ROOT is not still yet, try locating Ogre headers or the OgreMain
+# library directly
 if(NOT DEFINED OGRE_ROOT)
 if(NOT DEFINED OGRE_ROOT)
     find_library(_ogre_lib OgreMain HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_ogre_lib OgreMain HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     if(_ogre_lib)
     if(_ogre_lib)
@@ -171,7 +174,8 @@ find_path(OGRE_CMAKE_MODULE_PATH FindOGRE.cmake
     "${CMAKE_CURRENT_SOURCE_DIR}/OgreSDK/CMake"
     "${CMAKE_CURRENT_SOURCE_DIR}/OgreSDK/CMake"
 )
 )
 if(NOT OGRE_CMAKE_MODULE_PATH)
 if(NOT OGRE_CMAKE_MODULE_PATH)
-    # Try additional conventional locations using OGRE_ROOT if set by user or auto-detection
+    # Try additional conventional locations using OGRE_ROOT if set by user or
+    # auto-detection
     if(DEFINED OGRE_ROOT)
     if(DEFINED OGRE_ROOT)
         find_path(OGRE_CMAKE_MODULE_PATH FindOGRE.cmake HINTS "${OGRE_ROOT}/CMake" "${OGRE_ROOT}/cmake")
         find_path(OGRE_CMAKE_MODULE_PATH FindOGRE.cmake HINTS "${OGRE_ROOT}/CMake" "${OGRE_ROOT}/cmake")
     endif()
     endif()
@@ -187,19 +191,22 @@ endif()
 if (WIN32)
 if (WIN32)
     set(Boost_USE_STATIC_LIBS TRUE)
     set(Boost_USE_STATIC_LIBS TRUE)
 else()
 else()
-    # Statically linking boost to a dynamic Ogre build doesn't work on Linux 64bit.
+    # Statically linking boost to a dynamic Ogre build doesn't work on Linux
+    # 64bit.
     set(Boost_USE_STATIC_LIBS ${OGRE_STATIC})
     set(Boost_USE_STATIC_LIBS ${OGRE_STATIC})
 endif ()
 endif ()
 if (MINGW)
 if (MINGW)
-    # Ensure OgreBites is linked (provides WindowEventUtilities and related symbols)
+    # Ensure OgreBites is linked (provides WindowEventUtilities and related
+    # symbols).
     find_library(_ogrebites_lib OgreBites HINTS ${OGRE_ROOT} /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_ogrebites_lib OgreBites HINTS ${OGRE_ROOT} /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     if(_ogrebites_lib)
     if(_ogrebites_lib)
-    # This is probably a bug in CMake: the boost find module tries to look for boost libraries with
-    # name libboost_*, but CMake already prefixes library search names with "lib". This is the
-    # workaround.
+    # This is probably a bug in CMake: the boost find module tries to look for
+    # boost libraries with name libboost_*, but CMake already prefixes library
+    # search names with "lib". This is the workaround.
     set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "")
     set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "")
 endif ()
 endif ()
-# Components that need linking (NB does not include header-only components like bind).
+# Components that need linking (NB does not include header-only components like
+# bind).
 set(OGRE_BOOST_COMPONENTS thread date_time)
 set(OGRE_BOOST_COMPONENTS thread date_time)
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 if (NOT Boost_FOUND)
 if (NOT Boost_FOUND)
@@ -210,6 +217,7 @@ if(Boost_FOUND AND Boost_VERSION GREATER 104900)
     set(OGRE_BOOST_COMPONENTS thread date_time system chrono)
     set(OGRE_BOOST_COMPONENTS thread date_time system chrono)
     find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
     find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()
 endif()
+
 # Set up referencing of Boost.
 # Set up referencing of Boost.
 if (NOT APPLE)
 if (NOT APPLE)
     add_definitions(-DBOOST_ALL_NO_LIB)
     add_definitions(-DBOOST_ALL_NO_LIB)
@@ -218,7 +226,7 @@ if (Boost_LIBRARIES STREQUAL "")
     message(STATUS "Boost_LIBRARIES is not set yet; will attempt robust fallbacks later")
     message(STATUS "Boost_LIBRARIES is not set yet; will attempt robust fallbacks later")
 endif()
 endif()
 
 
-message(STATUS "DEBUG: entering Boost detection; BOOST_COMPONENTS=${BOOST_COMPONENTS} BOOST_LINK_LIBS=${BOOST_LINK_LIBS}")
+#message(STATUS "DEBUG: entering Boost detection; BOOST_COMPONENTS=${BOOST_COMPONENTS} BOOST_LINK_LIBS=${BOOST_LINK_LIBS}")
 
 
 
 
 # Find packages required for V-Gears.
 # Find packages required for V-Gears.
@@ -228,10 +236,11 @@ message(STATUS "DEBUG: entering Boost detection; BOOST_COMPONENTS=${BOOST_COMPON
 find_package(PkgConfig QUIET)
 find_package(PkgConfig QUIET)
 if(NOT DEFINED OGRE_PKG_FOUND)
 if(NOT DEFINED OGRE_PKG_FOUND)
     if(PKG_CONFIG_FOUND)
     if(PKG_CONFIG_FOUND)
-        # we already attempted pkg-config above; if that set OGRE_PKG_FOUND use it
+        # pkg-config already attempted above; if OGRE_PKG_FOUND is set, use it.
         if(DEFINED _ogre_pkgs_FOUND AND _ogre_pkgs_FOUND)
         if(DEFINED _ogre_pkgs_FOUND AND _ogre_pkgs_FOUND)
             set(OGRE_PKG_FOUND TRUE)
             set(OGRE_PKG_FOUND TRUE)
-            # OGRE_INCLUDE_DIRS/OGRE_LIBRARIES were set earlier when _ogre_pkgs was found
+            # OGRE_INCLUDE_DIRS/OGRE_LIBRARIES were set earlier when
+            # _ogre_pkgs was found.
         endif()
         endif()
     endif()
     endif()
 endif()
 endif()
@@ -254,9 +263,11 @@ if(OGRE_PKG_FOUND)
     if(_extra_ogre_libs)
     if(_extra_ogre_libs)
         list(APPEND OGRE_LIBRARIES ${_extra_ogre_libs})
         list(APPEND OGRE_LIBRARIES ${_extra_ogre_libs})
     endif()
     endif()
-    # Debug: show final OGRE libraries that will be linked
-    message(STATUS "Final OGRE_LIBRARIES: ${OGRE_LIBRARIES}")
+    # Display final OGRE libraries that will be linked
+    message(STATUS "Using OGRE_LIBRARIES: ${OGRE_LIBRARIES}")
 endif()
 endif()
+
+# Find OIS.
 find_package(OIS QUIET)
 find_package(OIS QUIET)
 if(NOT OIS_FOUND)
 if(NOT OIS_FOUND)
     find_library(_ois_lib NAMES OIS libOIS ois HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_ois_lib NAMES OIS libOIS ois HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
@@ -268,6 +279,7 @@ if(NOT OIS_FOUND)
     endif()
     endif()
 endif()
 endif()
 
 
+# Find OpenAL.
 find_package(OpenAL QUIET)
 find_package(OpenAL QUIET)
 if(NOT OPENAL_FOUND AND PKG_CONFIG_FOUND)
 if(NOT OPENAL_FOUND AND PKG_CONFIG_FOUND)
     pkg_check_modules(_openal_pkgs QUIET openal)
     pkg_check_modules(_openal_pkgs QUIET openal)
@@ -285,9 +297,9 @@ if(NOT OPENAL_FOUND AND NOT OPENAL_LIBRARY)
     endif()
     endif()
 endif()
 endif()
 
 
+# Find OggVorbis.
 find_package(OggVorbis QUIET)
 find_package(OggVorbis QUIET)
 if(NOT OGGVORBIS_FOUND)
 if(NOT OGGVORBIS_FOUND)
-    # Try to find vorbisfile/ogg libs directly
     find_library(_vorbisfile_lib NAMES vorbisfile libvorbisfile HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_vorbisfile_lib NAMES vorbisfile libvorbisfile HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_vorbis_lib NAMES vorbis libvorbis HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_vorbis_lib NAMES vorbis libvorbis HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_ogg_lib NAMES ogg libogg HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_ogg_lib NAMES ogg libogg HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
@@ -310,8 +322,7 @@ if(NOT OGGVORBIS_FOUND)
 endif()
 endif()
 
 
 # If the installer is requested, ensure Qt is available. If Qt is missing,
 # If the installer is requested, ensure Qt is available. If Qt is missing,
-# disable the installer to avoid compilation failures (useful for developers
-# who don't want to install Qt dev packages).
+# disable the installer to avoid compilation failures.
 if(BUILD_INSTALLER)
 if(BUILD_INSTALLER)
     # Optional user-provided hint: allow passing a single path that contains
     # Optional user-provided hint: allow passing a single path that contains
     # the Qt CMake config directories (e.g. '/usr/lib/x86_64-linux-gnu/cmake').
     # the Qt CMake config directories (e.g. '/usr/lib/x86_64-linux-gnu/cmake').
@@ -331,9 +342,9 @@ if(BUILD_INSTALLER)
     find_package(Qt5 COMPONENTS Core Widgets Gui QUIET)
     find_package(Qt5 COMPONENTS Core Widgets Gui QUIET)
     # Debugging: print detected Qt5 variables/targets when present
     # Debugging: print detected Qt5 variables/targets when present
     if(TARGET Qt5::Core)
     if(TARGET Qt5::Core)
-        message(STATUS "DEBUG: Qt5 imported target Qt5::Core is available")
+        message(STATUS "Qt5 imported: target Qt5::Core is available")
     endif()
     endif()
-    message(STATUS "DEBUG: Qt5Core_FOUND=${Qt5Core_FOUND} Qt5Widgets_FOUND=${Qt5Widgets_FOUND} Qt5Gui_FOUND=${Qt5Gui_FOUND}")
+    message(STATUS "Qt5Core_FOUND=${Qt5Core_FOUND} Qt5Widgets_FOUND=${Qt5Widgets_FOUND} Qt5Gui_FOUND=${Qt5Gui_FOUND}")
     # Some distro setups place Qt config files in nonstandard cmake dirs that
     # Some distro setups place Qt config files in nonstandard cmake dirs that
     # CMake may not probe. If the normal find_package didn't create imported
     # CMake may not probe. If the normal find_package didn't create imported
     # targets or set FOUND variables, probe common Qt config locations and
     # targets or set FOUND variables, probe common Qt config locations and
@@ -433,9 +444,9 @@ if(BUILD_INSTALLER)
     endif()
     endif()
 endif()
 endif()
 
 
+# Find TinyXML
 find_package(TinyXML QUIET)
 find_package(TinyXML QUIET)
 if(NOT TinyXML_FOUND)
 if(NOT TinyXML_FOUND)
-    # try to locate tinyxml library directly
     find_library(_tinyxml_lib NAMES tinyxml libtinyxml TiXml TiXmlDocument HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     find_library(_tinyxml_lib NAMES tinyxml libtinyxml TiXml TiXmlDocument HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib)
     if(_tinyxml_lib)
     if(_tinyxml_lib)
         set(TinyXML_LIBRARIES ${_tinyxml_lib})
         set(TinyXML_LIBRARIES ${_tinyxml_lib})
@@ -480,9 +491,9 @@ if(NOT BOOST_LINK_LIBS)
         if(_found_libs)
         if(_found_libs)
             # Prefer the first (usually the SONAME symlink), but append all found to be safe
             # Prefer the first (usually the SONAME symlink), but append all found to be safe
             list(APPEND BOOST_LINK_LIBS ${_found_libs})
             list(APPEND BOOST_LINK_LIBS ${_found_libs})
-            message(STATUS "Fallback: found boost ${_comp}: ${_found_libs}")
+            message(STATUS "Found boost ${_comp}: ${_found_libs}")
         else()
         else()
-            message(STATUS "Fallback: boost ${_comp} not found in standard lib dirs")
+            message(STATUS "Not found: boost ${_comp} not found in standard lib dirs")
         endif()
         endif()
     endforeach()
     endforeach()
     if(NOT BOOST_LINK_LIBS)
     if(NOT BOOST_LINK_LIBS)
@@ -514,8 +525,19 @@ endif()
 # using common Boost library names so the system linker searches standard paths.
 # using common Boost library names so the system linker searches standard paths.
 if(NOT BOOST_LINK_LIBS)
 if(NOT BOOST_LINK_LIBS)
     if(USE_DETERMINISTIC_FALLBACKS)
     if(USE_DETERMINISTIC_FALLBACKS)
-        set(BOOST_LINK_LIBS -lboost_program_options -lboost_filesystem -lboost_thread -lboost_system -lboost_chrono)
-        message(STATUS "Fallback: using generic -l flags for Boost: ${BOOST_LINK_LIBS}")
+        find_library(_boost_system_lib
+            NAMES boost_system libboost_system
+            HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib
+            PATH_SUFFIXES . lib lib64
+        )
+        set(_generic_boost_flags -lboost_program_options -lboost_filesystem -lboost_thread -lboost_chrono)
+        if(_boost_system_lib)
+            list(APPEND _generic_boost_flags ${_boost_system_lib})
+        else()
+            message(STATUS "Boost.System library not found; omitting boost_system from generic Boost flags.")
+        endif()
+        set(BOOST_LINK_LIBS ${_generic_boost_flags})
+        message(STATUS "Using generic Boost flags: ${BOOST_LINK_LIBS}")
     else()
     else()
         message(WARNING "Boost libraries not found and USE_DETERMINISTIC_FALLBACKS is OFF. Install libboost-*-dev packages or provide Boost hints (Boost_DIR/Boost_INCLUDE_DIR).")
         message(WARNING "Boost libraries not found and USE_DETERMINISTIC_FALLBACKS is OFF. Install libboost-*-dev packages or provide Boost hints (Boost_DIR/Boost_INCLUDE_DIR).")
     endif()
     endif()
@@ -530,7 +552,8 @@ if(NOT DEFINED VGEARS_SOURCE_DIR)
     set(VGEARS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
     set(VGEARS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 endif()
 endif()
 
 
-# Ensure OgreBites (WindowEventUtilities) is explicitly found and linked when available
+# Ensure OgreBites (WindowEventUtilities) is explicitly found and linked when
+# available.
 if(NOT OGRE_LIBRARIES)
 if(NOT OGRE_LIBRARIES)
     set(OGRE_LIBRARIES)
     set(OGRE_LIBRARIES)
 endif()
 endif()
@@ -545,7 +568,8 @@ else()
     message(STATUS "OgreBites not found by explicit search; OgreBites symbols may be unresolved.")
     message(STATUS "OgreBites not found by explicit search; OgreBites symbols may be unresolved.")
 endif()
 endif()
 
 
-# As a last-resort deterministic fallback, append the system path if the file exists.
+# As a last-resort deterministic fallback, append the system path if the file
+# exists.
 if(NOT OGRE_LIBRARIES MATCHES ".*OgreBites.*")
 if(NOT OGRE_LIBRARIES MATCHES ".*OgreBites.*")
     if(USE_DETERMINISTIC_FALLBACKS)
     if(USE_DETERMINISTIC_FALLBACKS)
         if(EXISTS "/usr/lib/x86_64-linux-gnu/libOgreBites.so")
         if(EXISTS "/usr/lib/x86_64-linux-gnu/libOgreBites.so")
@@ -712,13 +736,7 @@ set(VGEARS_SOURCE_FILES
     modules/worldmap/WorldmapModule.cpp
     modules/worldmap/WorldmapModule.cpp
     #viewer/ViewerModule.cpp
     #viewer/ViewerModule.cpp
 )
 )
-
-
-    message(STATUS "Final OGRE_LIBRARIES: ${OGRE_LIBRARIES}")
-    endif()
-# NOTE: include directories and compile definitions are attached to targets
-# later with `target_include_directories` and `target_compile_definitions`.
-
+endif()
 
 
 # Compiler options.
 # Compiler options.
 if(APPLE) # Apple specific options
 if(APPLE) # Apple specific options
@@ -736,7 +754,9 @@ if(WIN32) # Check usage and remove if uneccessary
     -Wl,--add-stdcall-alias
     -Wl,--add-stdcall-alias
     )
     )
 endif()
 endif()
-if (MSVC) # Build cpp files on all cores, up virtual mem for PCH's as cotire really makes the compiler scream
+if (MSVC)
+    # Build cpp files on all cores, up virtual mem for PCH's as cotire really
+    # makes the compiler scream.
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Zm193")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Zm193")
     add_definitions(-D_CRT_SECURE_NO_WARNINGS)
     add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 endif()
 endif()
@@ -778,51 +798,53 @@ foreach(_qinc IN LISTS _qt_global_candidates)
         break()
         break()
     endif()
     endif()
 endforeach()
 endforeach()
-        # Ensure UI headers generated by uic are available before compiling
-        # libvgears. Some build order setups (unity/PCH/cotire) may attempt to
-        # compile sources that include generated `ui_*.h` before uic runs, so add
-        # an explicit custom command/target to generate the header.
-        set(_ui_src "${CMAKE_CURRENT_SOURCE_DIR}/installer/MainWindow.ui")
-        # Place generated headers under the build tree parallel to the source dir
-        # CMAKE_CURRENT_BINARY_DIR is <build>/src so append 'installer' (not 'src/installer')
-        set(_ui_out "${CMAKE_CURRENT_BINARY_DIR}/installer/ui_MainWindow.h")
-        find_program(QT_UIC_EXECUTABLE NAMES uic uic-qt5 PATHS /usr/lib/qt5/bin /usr/bin /usr/local/bin)
-        if(QT_UIC_EXECUTABLE AND EXISTS "${_ui_src}")
-            add_custom_command(
-                OUTPUT "${_ui_out}"
-                COMMAND ${QT_UIC_EXECUTABLE} -o "${_ui_out}" "${_ui_src}"
-                DEPENDS "${_ui_src}"
-                COMMENT "Generating ui_MainWindow.h via uic"
-                VERBATIM
-            )
-            add_custom_target(generate_ui_files DEPENDS "${_ui_out}")
-            set(_GENERATED_UI_TARGET generate_ui_files)
-        endif()
+# Ensure UI headers generated by uic are available before compiling
+# libvgears. Some build order setups (unity/PCH/cotire) may attempt to
+# compile sources that include generated `ui_*.h` before uic runs, so add
+# an explicit custom command/target to generate the header.
+set(_ui_src "${CMAKE_CURRENT_SOURCE_DIR}/installer/MainWindow.ui")
+# Place generated headers under the build tree parallel to the source dir
+# CMAKE_CURRENT_BINARY_DIR is <build>/src so append 'installer' (not
+# 'src/installer').
+set(_ui_out "${CMAKE_CURRENT_BINARY_DIR}/installer/ui_MainWindow.h")
+find_program(QT_UIC_EXECUTABLE NAMES uic uic-qt5 PATHS /usr/lib/qt5/bin /usr/bin /usr/local/bin)
+if(QT_UIC_EXECUTABLE AND EXISTS "${_ui_src}")
+    add_custom_command(
+        OUTPUT "${_ui_out}"
+        COMMAND ${QT_UIC_EXECUTABLE} -o "${_ui_out}" "${_ui_src}"
+        DEPENDS "${_ui_src}"
+        COMMENT "Generating ui_MainWindow.h via uic"
+        VERBATIM
+    )
+    add_custom_target(generate_ui_files DEPENDS "${_ui_out}")
+    set(_GENERATED_UI_TARGET generate_ui_files)
+endif()
 
 
-        # Exclude unit tests under installer/decompiler/test from the main
-        # library to avoid pulling test-only dependencies (gtest/gmock).
-        set(_test_removed_count 0)
-        foreach(_f IN LISTS VGEARS_SOURCE_FILES)
-            if(_f MATCHES "installer/decompiler/test/")
-                list(REMOVE_ITEM VGEARS_SOURCE_FILES ${_f})
-                math(EXPR _test_removed_count "${_test_removed_count} + 1")
-            endif()
-        endforeach()
-        if(_test_removed_count GREATER 0)
-            message(STATUS "Removed ${_test_removed_count} decompiler test source(s) from libvgears")
-        endif()
+# Exclude unit tests under installer/decompiler/test from the main
+# library to avoid pulling test-only dependencies (gtest/gmock).
+set(_test_removed_count 0)
+foreach(_f IN LISTS VGEARS_SOURCE_FILES)
+    if(_f MATCHES "installer/decompiler/test/")
+        list(REMOVE_ITEM VGEARS_SOURCE_FILES ${_f})
+        math(EXPR _test_removed_count "${_test_removed_count} + 1")
+    endif()
+endforeach()
+if(_test_removed_count GREATER 0)
+    message(STATUS "Removed ${_test_removed_count} decompiler test source(s) from libvgears")
+endif()
 
 
-        add_library(libvgears STATIC ${VGEARS_SOURCE_FILES})
-            # Ensure generated ui headers are created before compiling libvgears
-        if(DEFINED _GENERATED_UI_TARGET)
-            add_dependencies(libvgears ${_GENERATED_UI_TARGET})
-            # Generated ui headers live in <build>/src/installer
-            target_include_directories(libvgears PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/installer")
-        endif()
-        # Ensure platform macro for scummsys.h selection on Unix
-        if(UNIX)
-            target_compile_definitions(libvgears PRIVATE POSIX)
-        endif()
+add_library(libvgears STATIC ${VGEARS_SOURCE_FILES})
+# Ensure generated ui headers are created before compiling libvgears
+if(DEFINED _GENERATED_UI_TARGET)
+    add_dependencies(libvgears ${_GENERATED_UI_TARGET})
+    # Generated ui headers live in <build>/src/installer
+    target_include_directories(libvgears PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/installer")
+endif()
+
+# Ensure platform macro for scummsys.h selection on Unix
+if(UNIX)
+    target_compile_definitions(libvgears PRIVATE POSIX)
+endif()
 if(USE_COTIRE)
 if(USE_COTIRE)
     cotire(libvgears)
     cotire(libvgears)
 endif()
 endif()
@@ -851,10 +873,10 @@ if(NOT MSVC)
     target_compile_options(libvgears PRIVATE -fPIC)
     target_compile_options(libvgears PRIVATE -fPIC)
 endif()
 endif()
 
 
-# If Qt link libraries were detected (imported targets or fallback libs),
-# link them to libvgears so imported-target include directories are
-# propagated to installer/source compilation. This ensures Qt headers are
-# available when compiling installer sources into the static lib.
+# If Qt link libraries were detected (imported targets or fallback libs), link
+# them to libvgears so imported-target include directories are propagated to
+# installer/source compilation. This ensures Qt headers are available when
+# compiling installer sources into the static lib.
 if(QT_LINK_LIBS)
 if(QT_LINK_LIBS)
     message(STATUS "Linking libvgears with Qt libraries: ${QT_LINK_LIBS}")
     message(STATUS "Linking libvgears with Qt libraries: ${QT_LINK_LIBS}")
     target_link_libraries(libvgears PUBLIC ${QT_LINK_LIBS})
     target_link_libraries(libvgears PUBLIC ${QT_LINK_LIBS})
@@ -882,6 +904,15 @@ endif()
 
 
 
 
 # Generate v-gears executable
 # Generate v-gears executable
+# Ensure installer sources are not compiled into the main executable; the
+# installer is built separately under `src/installer`. Remove any installer
+# sources from the source list used for the `v-gears` executable.
+foreach(_f IN LISTS VGEARS_SOURCE_FILES)
+    if(_f MATCHES "^installer/")
+        list(REMOVE_ITEM VGEARS_SOURCE_FILES ${_f})
+    endif()
+endforeach()
+
 add_executable(v-gears ${VGEARS_SOURCE_FILES})
 add_executable(v-gears ${VGEARS_SOURCE_FILES})
 SET_PROPERTY(TARGET v-gears PROPERTY FOLDER "build/v-gears")
 SET_PROPERTY(TARGET v-gears PROPERTY FOLDER "build/v-gears")
 set(CPACK_PACKAGE_EXECUTABLES v-gears "v-gears")
 set(CPACK_PACKAGE_EXECUTABLES v-gears "v-gears")
@@ -904,22 +935,30 @@ set(VGEARS_LIBRARIES
     ${OGRE_LIBRARIES}
     ${OGRE_LIBRARIES}
 )
 )
 
 
-# Ensure we have something for Boost; if BOOST_LINK_LIBS is empty, inject generic
-# `-lboost_*` flags directly so the system linker will attempt to resolve them from
-# standard library search paths.
+# Ensure we have something for Boost; if BOOST_LINK_LIBS is empty, inject
+# generic `-lboost_*` flags directly so the system linker will attempt to
+# resolve them from standard library search paths.
 if(NOT BOOST_LINK_LIBS)
 if(NOT BOOST_LINK_LIBS)
     if(USE_DETERMINISTIC_FALLBACKS)
     if(USE_DETERMINISTIC_FALLBACKS)
-        set(_generic_boost_flags -lboost_program_options -lboost_filesystem -lboost_thread -lboost_system -lboost_chrono)
+        find_library(_boost_system_lib
+            NAMES boost_system libboost_system
+            HINTS /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib
+            PATH_SUFFIXES . lib lib64
+        )
+        set(_generic_boost_flags -lboost_program_options -lboost_filesystem -lboost_thread -lboost_chrono)
+        if(_boost_system_lib)
+            list(APPEND _generic_boost_flags -lboost_system)
+        endif()
+        set(BOOST_LINK_LIBS ${_generic_boost_flags})
         message(STATUS "Injecting generic Boost -l flags into link list: ${_generic_boost_flags}")
         message(STATUS "Injecting generic Boost -l flags into link list: ${_generic_boost_flags}")
-        list(APPEND BOOST_LINK_LIBS ${_generic_boost_flags})
     else()
     else()
         message(WARNING "Boost not found and deterministic fallbacks disabled; build may fail. Install libboost-*-dev or provide Boost hints.")
         message(WARNING "Boost not found and deterministic fallbacks disabled; build may fail. Install libboost-*-dev or provide Boost hints.")
     endif()
     endif()
 endif()
 endif()
 
 
-# `BOOST_LINK_LIBS` should have been computed earlier (imported targets, find_package,
-# or the robust per-component fallback). Append whatever was found into the final
-# link list for the executable.
+# `BOOST_LINK_LIBS` should have been computed earlier (imported targets,
+# find_package, or the robust per-component fallback). Append whatever was found
+# into the final link list for the executable.
 list(APPEND VGEARS_LIBRARIES ${BOOST_LINK_LIBS} ${OIS_LIBRARIES} ${TinyXML_LIBRARIES})
 list(APPEND VGEARS_LIBRARIES ${BOOST_LINK_LIBS} ${OIS_LIBRARIES} ${TinyXML_LIBRARIES})
 if(QT_LINK_LIBS)
 if(QT_LINK_LIBS)
     list(APPEND VGEARS_LIBRARIES ${QT_LINK_LIBS})
     list(APPEND VGEARS_LIBRARIES ${QT_LINK_LIBS})
@@ -939,9 +978,9 @@ if(MULTITHREADING)
     )
     )
 endif()
 endif()
 message(STATUS "Final VGEARS_LIBRARIES list: ${VGEARS_LIBRARIES}")
 message(STATUS "Final VGEARS_LIBRARIES list: ${VGEARS_LIBRARIES}")
-# If OgreBites SONAME exists on the system but wasn't picked up earlier,
-# append it directly to the final link list so WindowEventUtilities symbols
-# are resolved at link time.
+# If OgreBites SONAME exists on the system but wasn't picked up earlier, append
+# it directly to the final link list so WindowEventUtilities symbols are
+#resolved at link time.
 if(USE_DETERMINISTIC_FALLBACKS)
 if(USE_DETERMINISTIC_FALLBACKS)
     if(EXISTS "/usr/lib/x86_64-linux-gnu/libOgreBites.so")
     if(EXISTS "/usr/lib/x86_64-linux-gnu/libOgreBites.so")
         list(FIND VGEARS_LIBRARIES "/usr/lib/x86_64-linux-gnu/libOgreBites.so" _found_bites)
         list(FIND VGEARS_LIBRARIES "/usr/lib/x86_64-linux-gnu/libOgreBites.so" _found_bites)
@@ -951,7 +990,8 @@ if(USE_DETERMINISTIC_FALLBACKS)
         endif()
         endif()
     endif()
     endif()
 else()
 else()
-    # When deterministic fallbacks are disabled, warn if OgreBites is likely missing.
+    # When deterministic fallbacks are disabled, warn if OgreBites is likely
+    # missing.
     if(NOT OGRE_LIBRARIES MATCHES ".*OgreBites.*")
     if(NOT OGRE_LIBRARIES MATCHES ".*OgreBites.*")
         message(WARNING "OgreBites not present in OGRE_LIBRARIES and deterministic fallbacks are disabled. Link errors may occur if OGRE dev packages are not installed.")
         message(WARNING "OgreBites not present in OGRE_LIBRARIES and deterministic fallbacks are disabled. Link errors may occur if OGRE dev packages are not installed.")
     endif()
     endif()
@@ -964,6 +1004,8 @@ target_include_directories(v-gears
     PRIVATE
     PRIVATE
         ${VGEARS_SOURCE_DIR}
         ${VGEARS_SOURCE_DIR}
         ${CMAKE_CURRENT_SOURCE_DIR}
         ${CMAKE_CURRENT_SOURCE_DIR}
+        ${CMAKE_CURRENT_SOURCE_DIR}/installer
+        ${CMAKE_CURRENT_BINARY_DIR}/installer
         ${Boost_INCLUDE_DIR}
         ${Boost_INCLUDE_DIR}
         ${OIS_INCLUDE_DIRS}
         ${OIS_INCLUDE_DIRS}
         ${OGRE_INCLUDE_DIRS}
         ${OGRE_INCLUDE_DIRS}
@@ -975,6 +1017,19 @@ target_include_directories(v-gears
         ${CMAKE_SOURCE_DIR}/lib/luabind/luabind/detail
         ${CMAKE_SOURCE_DIR}/lib/luabind/luabind/detail
     ${QT_INCLUDE_DIRS}
     ${QT_INCLUDE_DIRS}
 )
 )
+
+# If UI files are generated by the uic custom target, make sure the executable
+# depends on it and can see the generated headers.
+if(DEFINED _GENERATED_UI_TARGET)
+    add_dependencies(v-gears ${_GENERATED_UI_TARGET})
+    target_include_directories(v-gears PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/installer")
+endif()
+
+# Ensure platform macro for scummsys.h selection on Unix when building the main
+# executable as well (same as done for libvgears).
+if(UNIX)
+    target_compile_definitions(v-gears PRIVATE POSIX)
+endif()
 target_compile_definitions(v-gears PRIVATE TIXML_USE_STL)
 target_compile_definitions(v-gears PRIVATE TIXML_USE_STL)
 if(NOT MSVC)
 if(NOT MSVC)
     target_compile_options(v-gears PRIVATE -fPIC)
     target_compile_options(v-gears PRIVATE -fPIC)
@@ -982,6 +1037,7 @@ endif()
 
 
 
 
 # Install v-gears.
 # Install v-gears.
+# TODO: Fix routes for installation
 if(WIN32 OR APPLE)
 if(WIN32 OR APPLE)
     install(TARGETS v-gears DESTINATION .)
     install(TARGETS v-gears DESTINATION .)
 else()
 else()
@@ -989,10 +1045,9 @@ else()
 endif()
 endif()
 
 
 
 
-
-# If installer build is enabled, ensure Qt includes/links are available for
-# the `installer` subdirectory. Do this before adding the subdirectory so
-# its targets inherit the settings.
+# If installer build is enabled, ensure Qt includes/links are available for the
+# `installer` subdirectory. Do this before adding the subdirectory so its
+# targets inherit the settings.
 if(BUILD_INSTALLER)
 if(BUILD_INSTALLER)
     # If pragmatic detection earlier set `QT_INCLUDE_DIRS`, expose them as
     # If pragmatic detection earlier set `QT_INCLUDE_DIRS`, expose them as
     # global include dirs so installer targets find headers.
     # global include dirs so installer targets find headers.

+ 1 - 1
src/installer/FieldDataInstaller.cpp

@@ -424,7 +424,7 @@ void FieldDataInstaller::ExportMesh(const std::string outdir, const Ogre::MeshPt
                                         output_dir_ + FIELD_MODELS_DIR + "/" + base_name + ".png",
                                         output_dir_ + FIELD_MODELS_DIR + "/" + base_name + ".png",
                                         output_dir_ + FIELD_MODELS_DIR + "/"
                                         output_dir_ + FIELD_MODELS_DIR + "/"
                                         + base_mesh_name + "_" + base_name + ".png",
                                         + base_mesh_name + "_" + base_name + ".png",
-                                      boost::filesystem::copy_option::overwrite_if_exists
+                                      boost::filesystem::copy_options::overwrite_existing
                                     );
                                     );
                                     textures.insert(unit->getTextureName());
                                     textures.insert(unit->getTextureName());
                                 }
                                 }

+ 1 - 1
src/installer/WorldInstaller.cpp

@@ -729,7 +729,7 @@ void WorldInstaller::ExportMesh(const std::string outdir, const Ogre::MeshPtr &m
                                         output_dir_ + ELEMENT_MODELS_DIR + "/" + base_name + ".png",
                                         output_dir_ + ELEMENT_MODELS_DIR + "/" + base_name + ".png",
                                         output_dir_ + ELEMENT_MODELS_DIR + "/"
                                         output_dir_ + ELEMENT_MODELS_DIR + "/"
                                         + base_mesh_name + "_" + base_name + ".png",
                                         + base_mesh_name + "_" + base_name + ".png",
-                                      boost::filesystem::copy_option::overwrite_if_exists
+                                      boost::filesystem::copy_options::overwrite_existing
                                     );
                                     );
                                     textures.insert(unit->getTextureName());
                                     textures.insert(unit->getTextureName());
                                 }
                                 }