1
0
Fork 0
flightgear/CMakeModules/SetupFGFSEmbeddedResources.cmake
James Turner 218df89b29 Embedded resources: better cmake command
Use add_custom_command and an intermediate OBJECT library to avoid
rerunning fgrcc unless the XML input file has actually changed.
2020-08-23 11:31:37 +01:00

11 lines
437 B
CMake

function(setup_fgfs_embedded_resources)
# On Windows, make sure fgrcc can be run (it needs third-party libraries)
if(MSVC)
if(MSVC_3RDPARTY_ROOT AND MSVC_3RDPARTY_DIR)
set(CMAKE_MSVCIDE_RUN_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/bin PARENT_SCOPE)
else()
message(FATAL_ERROR
"Either MSVC_3RDPARTY_ROOT or MSVC_3RDPARTY_DIR is empty or unset")
endif()
endif()
endfunction()