check if libzip and bzip2 have been found before adding them to include_directories
This commit is contained in:
parent
5c1ad4579f
commit
57ee83644e
2 changed files with 19 additions and 4 deletions
|
@ -8,6 +8,15 @@ if (ZLIB_FOUND)
|
|||
include_directories( ${ZLIB_INCLUDE_DIRS} )
|
||||
endif( ZLIB_FOUND )
|
||||
|
||||
if (LIBZIP_FOUND)
|
||||
include_directories( SYSTEM ${LIBZIP_INCLUDE_DIR} )
|
||||
include_directories( SYSTEM ${LIBZIP_CONF_INCLUDE_DIR} )
|
||||
endif( LIBZIP_FOUND )
|
||||
|
||||
if (BZIP2_FOUND)
|
||||
include_directories( SYSTEM ${BZIP2_INCLUDE_DIR} )
|
||||
endif( BZIP2_FOUND )
|
||||
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(pfaedle)
|
||||
add_subdirectory(cppgtfs)
|
||||
|
|
|
@ -6,9 +6,6 @@ list(REMOVE_ITEM pfaedle_SRC ${pfaedle_main})
|
|||
|
||||
include_directories(
|
||||
${PFAEDLE_INCLUDE_DIR}
|
||||
SYSTEM ${BZIP2_INCLUDE_DIR}
|
||||
SYSTEM ${LIBZIP_INCLUDE_DIR}
|
||||
SYSTEM ${LIBZIP_CONF_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
configure_file (
|
||||
|
@ -20,6 +17,15 @@ add_executable(pfaedle ${pfaedle_main})
|
|||
add_library(pfaedle_dep ${pfaedle_SRC})
|
||||
|
||||
include_directories(pfaedle_dep PUBLIC ${PROJECT_SOURCE_DIR}/src/xml/include/ ${PROJECT_SOURCE_DIR}/src/cppgtfs/src)
|
||||
target_link_libraries(pfaedle pfaedle_dep util configparser ad_cppgtfs -lpthread ${LIBZIP_LIBRARY} ${BZIP2_LIBRARIES})
|
||||
|
||||
target_link_libraries(pfaedle pfaedle_dep util configparser ad_cppgtfs -lpthread)
|
||||
|
||||
if (LIBZIP_FOUND)
|
||||
target_link_libraries(pfaedle ${LIBZIP_LIBRARY})
|
||||
endif( LIBZIP_FOUND )
|
||||
|
||||
if (BZIP2_FOUND)
|
||||
target_link_libraries(pfaedle ${BZIP2_LIBRARY})
|
||||
endif( BZIP2_FOUND )
|
||||
|
||||
add_subdirectory(tests)
|
||||
|
|
Loading…
Reference in a new issue