mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 05:43:14 +01:00
Add CMAKE_DL_LIBS to link command.
This commit is contained in:
@@ -426,7 +426,7 @@ set_target_properties(
|
||||
COMPILE_FLAGS "${LLVM_CXXFLAGS} ${EXTRA_CXXFLAGS}"
|
||||
LINK_FLAGS "${SANITIZE_LDFLAGS}"
|
||||
)
|
||||
target_link_libraries(${LDC_EXE} ${LDC_LIB} ${LIBCONFIG++_LIBRARY} ${PTHREAD_LIBS} ${TERMINFO_LIBS})
|
||||
target_link_libraries(${LDC_EXE} ${LDC_LIB} ${LIBCONFIG++_LIBRARY} ${PTHREAD_LIBS} ${CMAKE_DL_LIBS} ${TERMINFO_LIBS})
|
||||
if(MSVC)
|
||||
# Add a post build event in Visual Studio to copy the config file into Debug/Release folder
|
||||
add_custom_command(TARGET ${LDC_EXE} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/bin/${LDC_EXE}.conf $<TARGET_FILE_DIR:${LDC_EXE}> COMMENT "Copy config file ${LDC_EXE}.conf")
|
||||
@@ -464,7 +464,7 @@ set_target_properties(
|
||||
COMPILE_FLAGS "${TABLEGEN_CXXFLAGS} ${LDC_CXXFLAGS}"
|
||||
LINK_FLAGS "${SANITIZE_LDFLAGS}"
|
||||
)
|
||||
target_link_libraries(gen_gccbuiltins ${LLVM_LIBRARIES} ${PTHREAD_LIBS} ${TERMINFO_LIBS} "${LLVM_LDFLAGS}")
|
||||
target_link_libraries(gen_gccbuiltins ${LLVM_LIBRARIES} ${PTHREAD_LIBS} ${TERMINFO_LIBS} ${CMAKE_DL_LIBS} "${LLVM_LDFLAGS}")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
target_link_libraries(gen_gccbuiltins dl)
|
||||
endif()
|
||||
@@ -495,7 +495,7 @@ set_target_properties(${LDMD_EXE} PROPERTIES
|
||||
# use symbols from libdl, ..., so LLVM_LDFLAGS must come _after_ them in the
|
||||
# command line. Maybe this could be improved using library groups, at least with
|
||||
# GNU ld.
|
||||
target_link_libraries(${LDMD_EXE} ${LLVM_LIBRARIES} ${PTHREAD_LIBS} ${TERMINFO_LIBS} "${LLVM_LDFLAGS}")
|
||||
target_link_libraries(${LDMD_EXE} ${LLVM_LIBRARIES} ${PTHREAD_LIBS} ${TERMINFO_LIBS} ${CMAKE_DL_LIBS} "${LLVM_LDFLAGS}")
|
||||
|
||||
#
|
||||
# Test and runtime targets. Note that enable_testing() is order-sensitive!
|
||||
|
||||
Reference in New Issue
Block a user