diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d0e7dad..d60a569 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/pfaedle/CMakeLists.txt b/src/pfaedle/CMakeLists.txt index 124e5d5..7214555 100644 --- a/src/pfaedle/CMakeLists.txt +++ b/src/pfaedle/CMakeLists.txt @@ -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)