changeset 1424:b424028392cf

fixing some build errors
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 May 2020 11:41:33 +0200
parents 6c3f260c4de7
children 95674f9c169a
files Resources/CMake/BoostExtendedConfiguration.cmake Samples/Sdl/CMakeLists.txt Samples/Sdl/SdlHelpers.h
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/BoostExtendedConfiguration.cmake	Thu May 14 07:55:28 2020 +0200
+++ b/Resources/CMake/BoostExtendedConfiguration.cmake	Fri May 15 11:41:33 2020 +0200
@@ -35,5 +35,9 @@
     #${BOOST_SOURCES_DIR}/libs/program_options/src/winmain.cpp
     )
   add_definitions(-DBOOST_PROGRAM_OPTIONS_NO_LIB)
+else()
+  find_package(Boost COMPONENTS program_options)
+  include_directories(${Boost_INCLUDE_DIRS})
+  link_libraries(${Boost_LIBRARIES})
 endif()
 
--- a/Samples/Sdl/CMakeLists.txt	Thu May 14 07:55:28 2020 +0200
+++ b/Samples/Sdl/CMakeLists.txt	Fri May 15 11:41:33 2020 +0200
@@ -30,6 +30,7 @@
   UBUNTU_FONT  ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
   )
 
+include(${STONE_ROOT}/Resources/CMake/BoostExtendedConfiguration.cmake)
 include(${STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake)
 include(${STONE_ROOT}/Resources/CMake/Utilities.cmake)
 
@@ -73,6 +74,7 @@
   ../Common/SampleHelpers.h
   SingleFrameViewer/SdlSimpleViewerApplication.h
   SingleFrameViewer/SdlSimpleViewer.cpp
+  ${BOOST_EXTENDED_SOURCES}
   )
 
 target_link_libraries(SdlSimpleViewer ${DCMTK_LIBRARIES} OrthancStone)
--- a/Samples/Sdl/SdlHelpers.h	Thu May 14 07:55:28 2020 +0200
+++ b/Samples/Sdl/SdlHelpers.h	Fri May 15 11:41:33 2020 +0200
@@ -112,7 +112,8 @@
       if (windowID == curWindowID)
         return sdlViewport;
     }
-    return NULL;
+    
+    return boost::shared_ptr<OrthancStone::SdlViewport>();
   }
 }