mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
CMake: Fix mingw32 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -258,6 +258,15 @@ endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
|
|||||||
include(AddLLVM)
|
include(AddLLVM)
|
||||||
include(TableGen)
|
include(TableGen)
|
||||||
|
|
||||||
|
if( MINGW )
|
||||||
|
get_system_libs(LLVM_SYSTEM_LIBS_LIST)
|
||||||
|
foreach(l ${LLVM_SYSTEM_LIBS_LIST})
|
||||||
|
set(LLVM_SYSTEM_LIBS "${LLVM_SYSTEM_LIBS} -l${l}")
|
||||||
|
endforeach()
|
||||||
|
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES}${LLVM_SYSTEM_LIBS}")
|
||||||
|
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}${LLVM_SYSTEM_LIBS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(lib/Support)
|
add_subdirectory(lib/Support)
|
||||||
add_subdirectory(lib/System)
|
add_subdirectory(lib/System)
|
||||||
|
|
||||||
|
@@ -78,16 +78,18 @@ macro(add_llvm_executable name)
|
|||||||
target_link_libraries( ${name} ${lib} )
|
target_link_libraries( ${name} ${lib} )
|
||||||
endforeach(lib)
|
endforeach(lib)
|
||||||
endif( LLVM_USED_LIBS )
|
endif( LLVM_USED_LIBS )
|
||||||
get_system_libs(llvm_system_libs)
|
|
||||||
if( llvm_system_libs )
|
|
||||||
target_link_libraries(${name} ${llvm_system_libs})
|
|
||||||
endif()
|
|
||||||
if( LLVM_COMMON_DEPENDS )
|
if( LLVM_COMMON_DEPENDS )
|
||||||
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
|
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
|
||||||
endif( LLVM_COMMON_DEPENDS )
|
endif( LLVM_COMMON_DEPENDS )
|
||||||
if (LLVM_COMMON_LIBS)
|
if (LLVM_COMMON_LIBS)
|
||||||
target_link_libraries(${name} ${LLVM_COMMON_LIBS})
|
target_link_libraries(${name} ${LLVM_COMMON_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
if( NOT MINGW )
|
||||||
|
get_system_libs(llvm_system_libs)
|
||||||
|
if( llvm_system_libs )
|
||||||
|
target_link_libraries(${name} ${llvm_system_libs})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endmacro(add_llvm_executable name)
|
endmacro(add_llvm_executable name)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user