Comment vérifier si find_package trouvé le paquet (boost)

Je veux pas ajouter un coup de pouce.cxx si cmake find_package pas trouvé de boost installé. Ne find_package retourner quelque chose que je peux enrouler dans la condition de compiler boost.cxx ou pas. Voici mon fichier cmake:

add_executable (complex complex.cxx lexer.cxx boost.cxx ../../src/lili.cxx ../../src/lilu.cxx)

# Make sure the compiler can find all include files
include_directories (../../src) 
include_directories (.)

# Make sure the linker can find all needed libraries
# rt: clock_gettime()
target_link_libraries(complex rt)

# Install example application
install (TARGETS complex
         RUNTIME DESTINATION bin)

IF(UNIX)
    find_package(Boost COMPONENTS system filesystem REQUIRED)

    ## Compiler flags
    if(CMAKE_COMPILER_IS_GNUCXX)
        set(CMAKE_CXX_FLAGS "-O2")
        set(CMAKE_EXE_LINKER_FLAGS "-lsqlite3 -lrt -lpthread")
    endif()

    target_link_libraries(complex 
      ${Boost_FILESYSTEM_LIBRARY}
      ${Boost_SYSTEM_LIBRARY}
      #${PROTOBUF_LIBRARY}
    )
ENDIF(UNIX)

OriginalL'auteur Ashera | 2012-04-19