Skip to content

RadioLogicCreator CMakeLists.txt

Marco BARNIG edited this page Dec 18, 2019 · 3 revisions

In the tutorial lesson 9 we learned how the CMake process works to compile the C++ code. The RadioLogicCreator CMakeLists.txt file is located in the folder /RadioLogicCreator/.

The CMake script is similar to the code explained in the tutorial. One difference is that we embed some external Javascript into the plugin code to extend the Orthanc Explorer features by adding additional buttons into the native interface.

The related new command is

EmbedResources(    
  ORTHANC_EXPLORER  ${CMAKE_SOURCE_DIR}/Resources/OrthancExplorer.js   
)

To compile and link the different code files to a shared library we write at the end of the script

add_library(RadioLogicCreator SHARED   
  ${CORE_SOURCES}    
  ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp   
  ${CMAKE_SOURCE_DIR}/Plugin/RadioLogicCreator.cpp   
  ${CMAKE_SOURCE_DIR}/Plugin/RadioLogicTools.cpp   
  ${AUTOGENERATED_SOURCES}  
)   

In the next chapter the extension of the Orthanc Explorer Javascript is presented.