Skip to content
Snippets Groups Projects
Commit 74606a3b authored by Alexis Girault's avatar Alexis Girault
Browse files

COMP: Find g3log_INCLUDE_DIR

Had to pass g3log_SOURCE_DIR from the superbuild to
the inner build to be able to find the librairies for
g3log in Findg3log.cmake.
parent b6521c67
No related branches found
No related tags found
3 merge requests!89Merge Refactoring into Master,!83Style corrections,!79Core sprint
...@@ -5,16 +5,23 @@ find_path(g3log_INCLUDE_DIR ...@@ -5,16 +5,23 @@ find_path(g3log_INCLUDE_DIR
NAMES NAMES
g3log/g3log.hpp g3log/g3log.hpp
g3log/logworker.hpp g3log/logworker.hpp
HINTS
${g3log_SOURCE_DIR}/src
) )
mark_as_advanced(g3log_INCLUDE_DIR) mark_as_advanced(g3log_INCLUDE_DIR)
message(STATUS "g3log_INCLUDE_DIR : ${g3log_INCLUDE_DIR}")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Find library # Find library
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
find_library(g3log_LIBRARY find_library(g3log_LIBRARY
NAMES NAMES
g3logger_shared) g3logger_shared
HINTS
${g3log_DIR}
)
mark_as_advanced(g3log_LIBRARY) mark_as_advanced(g3log_LIBRARY)
message(STATUS "g3log_LIBRARY : ${g3log_LIBRARY}")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Find package # Find package
...@@ -28,9 +35,10 @@ find_package_handle_standard_args(g3log ...@@ -28,9 +35,10 @@ find_package_handle_standard_args(g3log
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# If missing target, create it # If missing target, create it
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
if(G3LOG_FOUND AND NOT TARGET g3log::g3log) if(G3LOG_FOUND AND NOT TARGET g3log)
add_library(g3log::g3log INTERFACE IMPORTED) add_library(g3log INTERFACE IMPORTED)
set_target_properties(g3log::g3log PROPERTIES set_target_properties(g3log PROPERTIES
INTERFACE_LINK_LIBRARIES "${g3log_LIBRARY}" INTERFACE_LINK_LIBRARIES "${g3log_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${g3log_INCLUDE_DIR}") INTERFACE_INCLUDE_DIRECTORIES "${g3log_INCLUDE_DIR}"
)
endif() endif()
...@@ -95,5 +95,8 @@ macro(imstk_add_external_project extProj) ...@@ -95,5 +95,8 @@ macro(imstk_add_external_project extProj)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Keep track of project path to add it in the superbuild cache # Keep track of project path to add it in the superbuild cache
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
list( APPEND ${PROJECT_NAME}_EXTERNAL_PROJECTS_PATHS -D${extProj}_DIR:PATH=${${extProj}_DIR} ) list( APPEND ${PROJECT_NAME}_EXTERNAL_PROJECTS_PATHS
-D${extProj}_SOURCE_DIR:PATH=${${extProj}_SOURCE_DIR}
-D${extProj}_DIR:PATH=${${extProj}_DIR}
)
endmacro() endmacro()
...@@ -92,7 +92,7 @@ endif() ...@@ -92,7 +92,7 @@ endif()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# g3log # g3log
find_package( g3log REQUIRED ) find_package( g3log REQUIRED )
include_directories( ${g3log_INCLUDE_DIRS} ) include_directories( ${g3log_INCLUDE_DIR} )
# Uncrustify # Uncrustify
include(SetupUncrustifyConfig) include(SetupUncrustifyConfig)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment