mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-17 17:48:45 +02:00
Fix for linker warning LNK4075 on Windows
Specifcally, this warning: LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification The fix is to set /OPT:NOREF and /OPT:NOICF on debug builds.
This commit is contained in:
parent
6d65f1e3b6
commit
a9e25c51e5
3 changed files with 15 additions and 1 deletions
|
@ -34,6 +34,13 @@ macro(SETUP_HIFI_PROJECT)
|
||||||
# find these Qt modules and link them to our own target
|
# find these Qt modules and link them to our own target
|
||||||
find_package(Qt5 COMPONENTS ${${TARGET_NAME}_DEPENDENCY_QT_MODULES} REQUIRED)
|
find_package(Qt5 COMPONENTS ${${TARGET_NAME}_DEPENDENCY_QT_MODULES} REQUIRED)
|
||||||
|
|
||||||
|
# disable /OPT:REF and /OPT:ICF for the Debug builds
|
||||||
|
# This will prevent the following linker warnings
|
||||||
|
# LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
|
||||||
|
if (WIN32)
|
||||||
|
set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG "/OPT:NOREF /OPT:NOICF")
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach(QT_MODULE ${${TARGET_NAME}_DEPENDENCY_QT_MODULES})
|
foreach(QT_MODULE ${${TARGET_NAME}_DEPENDENCY_QT_MODULES})
|
||||||
target_link_libraries(${TARGET_NAME} Qt5::${QT_MODULE})
|
target_link_libraries(${TARGET_NAME} Qt5::${QT_MODULE})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
|
@ -100,6 +100,13 @@ else()
|
||||||
add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM})
|
add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# disable /OPT:REF and /OPT:ICF for the Debug builds
|
||||||
|
# This will prevent the following linker warnings
|
||||||
|
# LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
|
||||||
|
if (WIN32)
|
||||||
|
set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG "/OPT:NOREF /OPT:NOICF")
|
||||||
|
endif()
|
||||||
|
|
||||||
# link required hifi libraries
|
# link required hifi libraries
|
||||||
link_hifi_libraries(shared octree environment gpu gl procedural model render
|
link_hifi_libraries(shared octree environment gpu gl procedural model render
|
||||||
recording fbx networking model-networking entities avatars
|
recording fbx networking model-networking entities avatars
|
||||||
|
|
Loading…
Reference in a new issue