FosterFramework / Foster

A small C# game framework
MIT License
435 stars 38 forks source link

Windows native library builds to the wrong directory #18

Closed NoelFB closed 11 months ago

NoelFB commented 11 months ago

The CMake project has

set_target_properties(FosterPlatform
    PROPERTIES
    ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libs/${FosterTarget}"
    LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libs/${FosterTarget}"
    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libs/${FosterTarget}"
)

And this works for Linux/macOS, however on Windows the result project appends a /Release or /Debug to the output path, which isn't what Framework .csproj looks for. Is there a way to update this in CMake to not append configuration to the end on Windows?

Alternatively could make the Framework .csproj just copy from the Release subfolder instead.

NoelFB commented 11 months ago

Might need this https://cmake.org/cmake/help/latest/prop_tgt/LIBRARY_OUTPUT_DIRECTORY_CONFIG.html

NoelFB commented 11 months ago

That fixed it.