External_g3log.cmake 1.27 KB
Newer Older
1
2
3
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
Aaron Bray's avatar
Aaron Bray committed
4

Aaron Bray's avatar
Aaron Bray committed
5
6
7
include(imstkAddExternalProject)
imstk_define_external_dirs( g3log )

Aaron Bray's avatar
Aaron Bray committed
8
if(MSVC)
Aaron Bray's avatar
Aaron Bray committed
9
10
11
12
  set(g3log_built_library ${CMAKE_COMMAND} -E copy 
                          ${g3log_BINARY_DIR}/$(Configuration)/g3logger$<$<CONFIG:Debug>:d>.lib
                          ${CMAKE_INSTALL_PREFIX}/lib/)
  set(g3log_built_shared)
13
else()
Aaron Bray's avatar
Aaron Bray committed
14
15
16
17
18
19
  set(g3log_built_library ${CMAKE_COMMAND} -E copy 
                          ${g3log_BINARY_DIR}/libg3logger.a
                          ${CMAKE_INSTALL_PREFIX}/lib/)
  set(g3log_built_shared ${CMAKE_COMMAND} -E copy 
                         ${g3log_BINARY_DIR}/libg3logger.so
                         ${CMAKE_INSTALL_PREFIX}/lib/)
Aaron Bray's avatar
Aaron Bray committed
20
21
endif()

22
imstk_add_external_project( g3log
23
  GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/g3log.git
Alexis Girault's avatar
Alexis Girault committed
24
  GIT_TAG 6c1698c4f7db6b9e4246ead38051f9866ea3ac06
25
26
  CMAKE_CACHE_ARGS
    -DADD_FATAL_EXAMPLE:BOOL=OFF
Aaron Bray's avatar
Aaron Bray committed
27
28
  INSTALL_COMMAND
    COMMAND ${CMAKE_COMMAND} -E copy_directory ${g3log_SOURCE_DIR}/src/g3log ${CMAKE_INSTALL_PREFIX}/include/g3log
Aaron Bray's avatar
Aaron Bray committed
29
30
    COMMAND ${g3log_built_library}
    COMMAND ${g3log_built_shared}
31
32
  RELATIVE_INCLUDE_PATH "src"
  DEPENDENCIES ""
33
34
  #VERBOSE
  )