diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,9 +24,12 @@ include(AddCompilerFlags) remove_compiler_flags(-DNDEBUG) -# Ensure that WINDRES_PREPROC is enabled when using windres. if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + # Ensure that WINDRES_PREPROC is enabled when using windres. list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") + # CMake adds a library path to the compiler insallation directory. + # This may conflict with the depends//lib directory, so remove it. + set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "") endif() # CMake provides the POSITION_INDEPENDENT_CODE property to set PIC/PIE.