# ---------------------------------------------------------------------------- # CMake file for libKPM. See root CMakeLists.txt # # ---------------------------------------------------------------------------- project(libKPM) find_package(Eigen3 REQUIRED) file(GLOB_RECURSE lib_srcs ${CMAKE_CURRENT_SOURCE_DIR}/*.c) file(GLOB_RECURSE lib_srcpp ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) remove_from_list(lib_srcpp visual_database_io.cpp) set(lib_sources ${lib_srcs} ${lib_srcpp}) file(GLOB_RECURSE lib_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/*.h) file(GLOB_RECURSE lib_hbase ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/KPM/*.h) set(lib_includes ${lib_hdrs} ${lib_hbase}) # ---------------------------------------------------------------------------------- # Define the library target: # ---------------------------------------------------------------------------------- add_library(libKPM STATIC ${lib_sources} ${lib_includes}) if (CMAKE_COMPILER_IS_GNUCXX) # Fix x64 issues on Linux if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE) add_definitions(-fPIC) endif() endif (CMAKE_COMPILER_IS_GNUCXX) if (JPEG_FOUND) include_directories(FreakMatcher ${CMAKE_CURRENT_SOURCE_DIR}/../../../include ${EIGEN3_INCLUDE_DIR} ${JPEG_INCLUDE_DIR}) add_definitions(-DHAVE_LIBJPEG=1) else (JPEG_FOUND) include_directories(FreakMatcher ${CMAKE_CURRENT_SOURCE_DIR}/../../../include ${EIGEN3_INCLUDE_DIR}) endif (JPEG_FOUND) # Add definitions #add_definitions(-D_DEF) # set the lib version set_target_properties(libKPM PROPERTIES OUTPUT_NAME libKPM VERSION "${ARToolKit_VERSION}" SOVERSION "${ARToolKit_VERSION_MAJOR}" ) #target_link_libraries(libKPM ${BTLIBRARIES} ${Boost_LIBRARIES}) artoolkit_config_lib(libKPM) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/KPM DESTINATION include FILES_MATCHING PATTERN "*.h") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")