Skip to content

Commit

Permalink
Merge pull request #379 from chevtche/master
Browse files Browse the repository at this point in the history
Libray and include paths are defined for upper and lower cases packag…
  • Loading branch information
Raphael Dumusc committed Jul 27, 2015
2 parents fcd3282 + bff8053 commit 7d38dc5
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions CommonPackage.cmake
Expand Up @@ -132,20 +132,25 @@ macro(common_package Package_Name)
endif()
set(${PROJECT_NAME}_FIND_PACKAGES_FOUND
"${${PROJECT_NAME}_FIND_PACKAGES_FOUND} ${Package_Name}")
link_directories(${${${Package_Name}_name}_LIBRARY_DIRS})
if(NOT "${${${Package_Name}_name}_INCLUDE_DIRS}" MATCHES "-NOTFOUND")
if(__is_system_package)
include_directories(BEFORE SYSTEM ${${${Package_Name}_name}_INCLUDE_DIRS})
else()
include_directories(${${${Package_Name}_name}_INCLUDE_DIRS})
endif()
set(__library_dirs ${Package_Name}_LIBRARY_DIRS ${PACKAGE_NAME}_LIBRARY_DIRS)
link_directories( ${__library_dirs} )
set(__include_dirs)
if(NOT "${${Package_Name}_INCLUDE_DIRS}" MATCHES "-NOTFOUND")
list(APPEND __include_dirs ${${Package_Name}_INCLUDE_DIRS})
endif()
if(NOT "${${${Package_Name}_name}_INCLUDE_DIR}" MATCHES "-NOTFOUND")
if(__is_system_package)
include_directories(BEFORE SYSTEM ${${${Package_Name}_name}_INCLUDE_DIR})
else()
include_directories(${${${Package_Name}_name}_INCLUDE_DIR})
endif()
if(NOT "${${PACKAGE_NAME}_INCLUDE_DIRS}" MATCHES "-NOTFOUND")
list(APPEND __include_dirs ${${PACKAGE_NAME}_INCLUDE_DIRS})
endif()
if(NOT "${${Package_Name}_INCLUDE_DIR}" MATCHES "-NOTFOUND")
list(APPEND __include_dirs ${${Package_Name}_INCLUDE_DIR})
endif()
if(NOT "${${PACKAGE_NAME}_INCLUDE_DIR}" MATCHES "-NOTFOUND")
list(APPEND __include_dirs ${${PACKAGE_NAME}_INCLUDE_DIR})
endif()
if(__is_system_package)
include_directories(BEFORE SYSTEM ${__include_dirs})
else()
include_directories(${__include_dirs})
endif()
endif()
endmacro()
Expand Down

0 comments on commit 7d38dc5

Please sign in to comment.