# ---------------------------------------------------------------------------- # CMake file for libARwrapper. See root CMakeLists.txt # # ---------------------------------------------------------------------------- project(libARwrapper) file(GLOB_RECURSE lib_srcs ${CMAKE_CURRENT_SOURCE_DIR}/*.c) file(GLOB_RECURSE lib_srcpp ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) set(lib_sources ${lib_srcs} ${lib_srcpp}) file(GLOB_RECURSE lib_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/*.h) file(GLOB_RECURSE lib_hbase ${CMAKE_SOURCE_DIR}/include/ARWrapper/*.h) set(lib_includes ${lib_hdrs} ${lib_hbase}) option ("ARToolKit_INCLUDE_VIDEO_SOURCE" "Build artoolkit with Video sources" OFF) if (${ARToolKit_ADAPTATIVE_TEMPLATE}) remove_from_list(lib_sources VideoSource.cpp) remove_from_list(lib_sources AndroidFeatures.cpp) remove_from_list(lib_sources AndroidVideoSource.cpp) remove_from_list(lib_includes VideoSource.h) remove_from_list(lib_includes AndroidFeatures.h) remove_from_list(lib_includes AndroidVideoSource.h) add_definitions(-DREMOVE_VIDEO_SRC) endif() option ("ARToolKit_INCLUDE_API" "Build artoolkit with wrapper API" OFF) if (NOT ${ARToolKit_INCLUDE_API}) remove_from_list(lib_sources ARToolKitWrapperExportedAPI.cpp) remove_from_list(lib_includes ARToolKitWrapperExportedAPI.h) endif() # ---------------------------------------------------------------------------------- # Define the library target: # ---------------------------------------------------------------------------------- add_library(libARwrapper 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) include_directories(include ${CMAKE_SOURCE_DIR}/include) # Add definitions add_definitions(-DHAVE_NFT=1) # set the lib version set_target_properties(libARwrapper PROPERTIES OUTPUT_NAME libARwrapper VERSION "${ARToolKit_VERSION}" SOVERSION "${ARToolKit_VERSION_MAJOR}" ) if(THREADS_HAVE_PTHREAD_ARG) target_compile_options(PUBLIC libARwrapper "-pthread") endif() if(CMAKE_THREAD_LIBS_INIT) target_link_libraries(libARwrapper "${CMAKE_THREAD_LIBS_INIT}") endif() #target_link_libraries(libARwrapper ${BTLIBRARIES} ${Boost_LIBRARIES}) artoolkit_config_lib(libARwrapper) install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ARWrapper DESTINATION include FILES_MATCHING PATTERN "*.h") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")