# ---------------------------------------------------------------------------- # CMake file for libAR. See root CMakeLists.txt # # ---------------------------------------------------------------------------- project(libAR) file(GLOB_RECURSE lib_srcs ${CMAKE_CURRENT_SOURCE_DIR}/*.c) file(GLOB_RECURSE lib_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/*.h) file(GLOB_RECURSE lib_hbase ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/AR/*.h) file(GLOB lib_hcommon ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/*.h) set(lib_includes ${lib_hdrs} ${lib_hbase} ${lib_hcommon}) # ---------------------------------------------------------------------------------- # Define the library target: # ---------------------------------------------------------------------------------- add_library(libAR STATIC ${lib_srcs} ${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) include_directories(include ${CMAKE_CURRENT_SOURCE_DIR}/../../../include) # Add definitions #add_definitions(-D_DEF) # set the lib version set_target_properties(libAR PROPERTIES OUTPUT_NAME libAR VERSION "${ARToolKit_VERSION}" SOVERSION "${ARToolKit_VERSION_MAJOR}" ) #target_link_libraries(libAR ${BTLIBRARIES} ${Boost_LIBRARIES}) artoolkit_config_lib(libAR) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/AR DESTINATION include FILES_MATCHING PATTERN "*.h") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") install(FILES ${lib_hcommon} DESTINATION include)