diff Platforms/Generic/CMakeLists.txt @ 221:d7b2590744f8 am

wip: building applications reusable in SDL and WASM
author am@osimis.io
date Mon, 11 Jun 2018 14:01:02 +0200
parents 07792a582de9
children ce4405d98b92
line wrap: on
line diff
--- a/Platforms/Generic/CMakeLists.txt	Fri Jun 08 14:41:45 2018 +0200
+++ b/Platforms/Generic/CMakeLists.txt	Mon Jun 11 14:01:02 2018 +0200
@@ -45,9 +45,13 @@
 ## Build all the sample applications
 #####################################################################
 
-macro(BuildSample Target Sample)
+macro(BuildSample Target Header Sample)
   add_executable(${Target}
     ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleMainSdl.cpp
+    ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleApplicationContext.cpp
+    ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleInteractor.h
+    ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleApplicationBase.h
+    ${ORTHANC_STONE_ROOT}/Applications/Samples/${Header}
     ${APPLICATIONS_SOURCES}
     )
   set_target_properties(${Target} PROPERTIES COMPILE_DEFINITIONS ORTHANC_STONE_SAMPLE=${Sample})
@@ -57,10 +61,10 @@
 
 # TODO - Re-enable all these samples!
 
-BuildSample(OrthancStoneEmpty 1)
-BuildSample(OrthancStoneTestPattern 2)
-BuildSample(OrthancStoneSingleFrame 3)
-BuildSample(OrthancStoneSingleVolume 4)
+BuildSample(OrthancStoneEmpty EmptyApplication.h 1)
+BuildSample(OrthancStoneTestPattern TestPatternApplication.h 2)
+BuildSample(OrthancStoneSingleFrame SingleFrameApplication.h 3)
+BuildSample(OrthancStoneSingleVolume SingleVolumeApplication.h 4)
 #BuildSample(OrthancStoneBasicPetCtFusion 5)
 #BuildSample(OrthancStoneSynchronizedSeries 6)
 #BuildSample(OrthancStoneLayoutPetCtFusion 7)