Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Windows builds explicitly set CL environment variable to /DROS_BUILD_SHARED_LIBS=1 #39

Merged
merged 3 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions vinca/templates/bld_catkin.bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"
set CC=cl.exe
set CXX=cl.exe

:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin
:: if ROS (1) is build as shared library . However, some packages are not
:: passing compilation flags from CMake to other build systems (such as qmake),
:: so we enable it explicitly via the CL environment variable, see
:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
set CL=/DROS_BUILD_SHARED_LIBS=1

set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1"
if "%PKG_NAME%" == "ros-@(ros_distro)-catkin" (
:: create catkin cookie to make it is a catkin workspace
Expand Down
7 changes: 7 additions & 0 deletions vinca/templates/bld_catkin_merge.bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ setlocal
set CC=cl.exe
set CXX=cl.exe

:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin
:: if ROS (1) is build as shared library . However, some packages are not
:: passing compilation flags from CMake to other build systems (such as qmake),
:: so we enable it explicitly via the CL environment variable, see
:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
set CL=/DROS_BUILD_SHARED_LIBS=1

set CATKIN_MAKE_ISOLATED=src\ros-@(ros_distro)-catkin\bin\catkin_make_isolated
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH:\=/%

Expand Down