diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c5cc12a..bc922c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,13 @@ set(EXTRA_SYSTEM_LIBS -lrt) check_include_files(stdatomic.h HAVE_STDATOMIC_H) +find_path(UTHASH_INCLUDE_DIRS uthash.h PATH_SUFFIXES uthash) +if (UTHASH_INCLUDE_DIRS) + message ("uthash is found at ${UTHASH_INCLUDE_DIRS}") +else (UTHASH_INCLUDE_DIRS) + message (FATAL_ERROR "uthash is not found...") +endif (UTHASH_INCLUDE_DIRS) + pkg_check_modules(LIBXML2 libxml-2.0 REQUIRED) #Check in sibling directory @@ -46,24 +53,12 @@ if (NOT DISABLE_PCITOOL) pkg_check_modules(FASTWRITER fastwriter REQUIRED) endif (NOT DISABLE_PCITOOL) -add_definitions("-fPIC --std=c99 -Wall -O2 -gdwarf-2 -g3 -fno-omit-frame-pointer -g") +add_definitions("-fPIC --std=c99 -Wall -O2 -gdwarf-2 -g3 -fno-omit-frame-pointer") #add_definitions("-fPIC --std=c99 -Wall -O2") include(cmake/version.cmake) VERSION_TO_VARS(${PCILIB_VERSION} PCILIB_VERSION_MAJOR PCILIB_VERSION_MINOR PCILIB_VERSION_MICRO) -add_subdirectory(dma) -add_subdirectory(protocols) -add_subdirectory(pcilib) -add_subdirectory(pcitool) -add_subdirectory(apps) -add_subdirectory(xml) - -set_target_properties(pcilib PROPERTIES - VERSION ${PCILIB_VERSION} - SOVERSION ${PCILIB_ABI_VERSION} -) - set(TARNAME "pcitool") set(PACKAGE_VERSION ${PCILIB_VERSION}) set(PACKAGE_NAME "${TARNAME}") @@ -77,6 +72,19 @@ set(PCILIB_MODEL_DIR "${PCILIB_DATA_DIR}/models" CACHE PATH "Directory to instal set(PCILIB_DOC_DIR "${CMAKE_CURRENT_BINARY_DIR}/docs/" CACHE PATH "Directory to install documentation") set(PCILIB_DEBUG_DIR "." CACHE PATH "Directory to write debug information") +add_subdirectory(dma) +add_subdirectory(protocols) +add_subdirectory(views) +add_subdirectory(pcilib) +add_subdirectory(pcitool) +add_subdirectory(apps) +add_subdirectory(xml) + +set_target_properties(pcilib PROPERTIES + VERSION ${PCILIB_VERSION} + SOVERSION ${PCILIB_ABI_VERSION} +) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/misc/pcitool.pc.in ${CMAKE_CURRENT_BINARY_DIR}/misc/pcitool.pc) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcilib/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/pcilib/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcilib/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/pcilib/version.h) |