Skip to content

Commit

Permalink
Fix unresolved external symbols on Windows (#392)
Browse files Browse the repository at this point in the history

---------

Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Oct 17, 2023
1 parent e52f97c commit 19a88e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
set (sources
BrownDistortionModel.cc
CameraSensorUtil.cc
Distortion.cc
EnvironmentalData.cc
GaussianNoiseModel.cc
Expand Down Expand Up @@ -59,7 +58,7 @@ target_link_libraries(${rendering_target}
gz-rendering${GZ_RENDERING_VER}::gz-rendering${GZ_RENDERING_VER}
)

set(camera_sources CameraSensor.cc)
set(camera_sources CameraSensor.cc CameraSensorUtil.cc)
gz_add_component(camera
SOURCES ${camera_sources}
DEPENDS_ON_COMPONENTS rendering
Expand All @@ -76,7 +75,7 @@ target_link_libraries(${camera_target}
gz-transport${GZ_TRANSPORT_VER}::gz-transport${GZ_TRANSPORT_VER}
)

set(depth_camera_sources DepthCameraSensor.cc)
set(depth_camera_sources DepthCameraSensor.cc CameraSensorUtil.cc)
gz_add_component(depth_camera
SOURCES ${depth_camera_sources}
DEPENDS_ON_COMPONENTS camera
Expand Down Expand Up @@ -165,7 +164,7 @@ gz_add_component(force_torque SOURCES ${force_torque_sources} GET_TARGET_NAME fo
set(navsat_sources NavSatSensor.cc)
gz_add_component(navsat SOURCES ${navsat_sources} GET_TARGET_NAME navsat_target)

set(rgbd_camera_sources RgbdCameraSensor.cc)
set(rgbd_camera_sources RgbdCameraSensor.cc CameraSensorUtil.cc)
gz_add_component(rgbd_camera
SOURCES ${rgbd_camera_sources}
DEPENDS_ON_COMPONENTS camera
Expand Down
4 changes: 2 additions & 2 deletions src/CameraSensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ bool CameraSensor::CreateCamera()
double cx = cameraSdf->LensIntrinsicsCx();
double cy = cameraSdf->LensIntrinsicsCy();
double s = cameraSdf->LensIntrinsicsSkew();
auto projectionMatrix = buildProjectionMatrix(
auto projectionMatrix = gz::sensors::buildProjectionMatrix(
this->dataPtr->camera->ImageWidth(),
this->dataPtr->camera->ImageHeight(),
fx, fy, cx, cy, s,
Expand Down Expand Up @@ -313,7 +313,7 @@ bool CameraSensor::CreateCamera()
double cy = cameraSdf->LensProjectionCy();
double s = 0;

auto projectionMatrix = buildProjectionMatrix(
auto projectionMatrix = gz::sensors::buildProjectionMatrix(
this->dataPtr->camera->ImageWidth(),
this->dataPtr->camera->ImageHeight(),
fx, fy, cx, cy, s,
Expand Down
4 changes: 2 additions & 2 deletions src/DepthCameraSensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ bool DepthCameraSensor::CreateCamera()
double cx = cameraSdf->LensIntrinsicsCx();
double cy = cameraSdf->LensIntrinsicsCy();
double s = cameraSdf->LensIntrinsicsSkew();
auto projectionMatrix = buildProjectionMatrix(
auto projectionMatrix = gz::sensors::buildProjectionMatrix(
this->dataPtr->depthCamera->ImageWidth(),
this->dataPtr->depthCamera->ImageHeight(), fx, fy, cx, cy, s,
this->dataPtr->depthCamera->NearClipPlane(),
Expand Down Expand Up @@ -446,7 +446,7 @@ bool DepthCameraSensor::CreateCamera()
double cy = cameraSdf->LensProjectionCy();
double s = 0;

auto projectionMatrix = buildProjectionMatrix(
auto projectionMatrix = gz::sensors::buildProjectionMatrix(
this->dataPtr->depthCamera->ImageWidth(),
this->dataPtr->depthCamera->ImageHeight(),
fx, fy, cx, cy, s,
Expand Down

0 comments on commit 19a88e8

Please sign in to comment.