RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 177 forks source link

CMake errors with ror-dependencies (Win10, Visual Studio 2019) #2969

Open ohlidalp opened 1 year ago

ohlidalp commented 1 year ago

@AnotherFoxGuy Give this top priority please.

I built latest ror-dependencies as Release only (Debug fails, see https://github.com/RigsOfRods/ror-dependencies/issues/63)

I got the following error (full log attached):

-- Found OIS: optimized;C:/Users/PetrLaptop/hobby/builds/ror-dependencies/Dependencies_Windows_Visual-Studio-16-2019/lib/OIS.lib;debug;C:/Users/PetrLaptop/hobby/builds/ror-dependencies/Dependencies_Windows_Visual-Studio-16-2019/lib/OIS_d.lib
CMake Error at cmake/find-modules/FindOIS.cmake:97 (set_target_properties):
  Property INTERFACE_LINK_LIBRARIES may not contain link-type keyword
  "optimized".  The INTERFACE_LINK_LIBRARIES property may contain
  configuration-sensitive generator-expressions which may be used to specify
  per-configuration rules.
Call Stack (most recent call first):
  cmake/DependenciesFunctions.cmake:145 (find_package)
  cmake/DependenciesConfig.cmake:25 (add_external_lib)
  CMakeLists.txt:120 (include)

-- Using 'OIS' system library (Found by find_package)

I tried commenting out these 2 lines: https://github.com/RigsOfRods/rigs-of-rods/blob/22af2e7697eafbf9af192a96da6dde023433b1cd/cmake/find-modules/FindPkgMacros.cmake#L84-L85 - that worked around the OIS issue but I got an OpenSSL issue (full log also attached):

-- Configuring done
CMake Error at source/main/CMakeLists.txt:408 (target_link_libraries):
  Target "RoR" links to:

    OpenSSL::SSL

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

CmakeLogs.zip

ohlidalp commented 1 year ago

Under #2970 it configures and builds OK, but upon launch I get these: image Essentially none of the DLLs are copied to RoR build dir, and VisualStudio project working directory is set to RoR build dir, not the deps dir.

Also, 'plugins.cfg' is wrong:

# Define plugin folder
PluginFolder=C:/Users/PetrLaptop/hobby/builds/ror-dependencies/Dependencies_Windows_Visual-Studio-16-2019/lib/OGRE
    . . .
Plugin=RenderSystem_Direct3D9
# Plugin=RenderSystem_Direct3D11
# Plugin=RenderSystem_GL

PluginFolder should be 'deps/bin/' and D3d11 + GL should be uncommented because they are present.