Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update windows.cmake to fix common build issues on Windows (#984)
* fix merge conflict, separate helper macro addition from this change * add NO_STRICT from catkin level for Windows build. * add Q_NOWINSTRICT * add more global helper. * add WIN32_LEAN_AND_MEAN * Avoid using set_target_properties on ALIAS targets (#26) * Avoid using set_target_properties on ALIAS targets This change is to fix the error like below: 2018-11-30T10:40:39.7610068Z CMake Error at C:/opt/ros/melodic/x64/share/catkin/cmake/platform/windows.cmake:47 (set_target_properties): 2018-11-30T10:40:39.7610963Z set_target_properties can not be used on an ALIAS target. 2018-11-30T10:40:39.7611263Z Call Stack (most recent call first): 2018-11-30T10:40:39.7611903Z abseil_cpp/CMake/AbseilHelpers.cmake:67 (add_library) 2018-11-30T10:40:39.7612185Z abseil_cpp/absl/base/CMakeLists.txt:74 (absl_library) * nit * Globally enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS for Windows build. (#29) Walking through the projects we touched for ROS, many of them simply are just missing the dllimport/dllexport declarative, so no imported library is generated and breaks the build for downstream projects. Some are fixed by defining dllexport/dllimport, by defining WINDOWS_EXPORT_ALL_SYMBOLS, or by switching them to STATIC library (STATIC lib sometimes even creates more problems since the author assumes it is a shared lib at run-time). In order to quickly enabling more untouched ROS packages, I am suggesting to enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS globally to quickly enabling them, but we should still encourage the package owners to explicitly use dllexport in our cookbook. * update comments, reorder definitions in alphabetical order (#37) * spelling
- Loading branch information