message: Don't move the generated library to dist location (especially when all configurations generates the file by same name), it breaks multi-config build systems like windows
diff: @@ -42,16 +42,16 @@ file(GLOB libantlrcpp_SRC
  add_library(antlr4_shared SHARED ${libantlrcpp_SRC})
  add_library(antlr4_static STATIC ${libantlrcpp_SRC})
  -set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here.
  -message(STATUS "Output libraries to ${LIB_OUTPUT_DIR}")
  -
  -# make sure 'make' works fine even if ${LIB_OUTPUT_DIR} is deleted.
  -add_custom_target(make_lib_output_dir ALL
  - COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_OUTPUT_DIR}
  - )
  -
  -add_dependencies(antlr4_shared make_lib_output_dir utfcpp)
  -add_dependencies(antlr4_static make_lib_output_dir utfcpp)
  +# set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here.
  +# message(STATUS "Output libraries to ${LIB_OUTPUT_DIR}")
  +#
  +# # make sure 'make' works fine even if ${LIB_OUTPUT_DIR} is deleted.
  +# add_custom_target(make_lib_output_dir ALL
  +# COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_OUTPUT_DIR}
  +# )
  +#
  +# add_dependencies(antlr4_shared make_lib_output_dir utfcpp)
  +# add_dependencies(antlr4_static make_lib_output_dir utfcpp)
  if(CMAKE_SYSTEM_NAME MATCHES "Linux")
  target_link_libraries(antlr4_shared ${UUID_LIBRARIES})
  @@ -104,18 +104,18 @@ set_target_properties(antlr4_shared
  PROPERTIES VERSION ${ANTLR_VERSION}
  SOVERSION ${ANTLR_VERSION}
  OUTPUT_NAME antlr4-runtime
  - LIBRARY_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  - # TODO: test in windows. DLL is treated as runtime.
  - # see https://cmake.org/cmake/help/v3.0/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html
  - RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  - ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  +# LIBRARY_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  +# # TODO: test in windows. DLL is treated as runtime.
  +# # see https://cmake.org/cmake/help/v3.0/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html
  +# RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  +# ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  COMPILE_FLAGS "${disabled_compile_warnings} ${extra_share_compile_flags}")
  set_target_properties(antlr4_static
  PROPERTIES VERSION ${ANTLR_VERSION}
  SOVERSION ${ANTLR_VERSION}
  OUTPUT_NAME "antlr4-runtime${static_lib_suffix}"
  - ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  +# ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
  COMPILE_FLAGS "${disabled_compile_warnings} ${extra_static_compile_flags}")
  install(TARGETS antlr4_shared
  