File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -27,18 +27,15 @@ endfunction()
2727# DEPRECATED! Should be merged into add_module_library.
2828function (enable_module target )
2929 if (MSVC )
30- if (CMAKE_GENERATOR STREQUAL "Ninja" )
31- # Ninja dyndep expects the .ifc output to be located in a specific relative path
32- file (RELATIVE_PATH BMI_DIR "${CMAKE_BINARY_DIR} " "${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${target} .dir" )
33- else ()
30+ if (NOT CMAKE_GENERATOR STREQUAL "Ninja" )
3431 set (BMI_DIR "${CMAKE_CURRENT_BINARY_DIR} " )
32+ file (TO_NATIVE_PATH "${BMI_DIR} /${target} .ifc" BMI )
33+ target_compile_options (${target}
34+ PRIVATE /interface /ifcOutput ${BMI}
35+ INTERFACE /reference fmt=${BMI} )
36+ set_target_properties (${target} PROPERTIES ADDITIONAL_CLEAN_FILES ${BMI} )
37+ set_source_files_properties (${BMI} PROPERTIES GENERATED ON )
3538 endif ()
36- file (TO_NATIVE_PATH "${BMI_DIR} /${target} .ifc" BMI )
37- target_compile_options (${target}
38- PRIVATE /interface /ifcOutput ${BMI}
39- INTERFACE /reference fmt=${BMI} )
40- set_target_properties (${target} PROPERTIES ADDITIONAL_CLEAN_FILES ${BMI} )
41- set_source_files_properties (${BMI} PROPERTIES GENERATED ON )
4239 endif ()
4340endfunction ()
4441
You can’t perform that action at this time.
0 commit comments