# ---------------------------------------------------------------------------- # CMake file for libARUtil. See root CMakeLists.txt # # ---------------------------------------------------------------------------- project(libARUtil) 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 lib_hbase ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/*.h) set(lib_includes ${lib_hdrs} ${lib_hbase}) # Add definitions if (PTHREAD_FOUND) include_directories(include ${CMAKE_CURRENT_SOURCE_DIR}/../../../include ${PTHREAD_INCLUDES_DIR}) else (PTHREAD_FOUND) include_directories(include ${CMAKE_CURRENT_SOURCE_DIR}/../../../include) if (WIN32) add_definitions(-DARUTIL_DISABLE_PTHREADS) endif(WIN32) endif (PTHREAD_FOUND) # ---------------------------------------------------------------------------------- # Define the library target: # ---------------------------------------------------------------------------------- add_library(libARUtil 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) # set the lib version set_target_properties(libARUtil PROPERTIES OUTPUT_NAME libARUtil VERSION "${ARToolKit_VERSION}" SOVERSION "${ARToolKit_VERSION_MAJOR}" ) #target_link_libraries(libARUtil ${BTLIBRARIES} ${Boost_LIBRARIES}) artoolkit_config_lib(libARUtil) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/Util DESTINATION include FILES_MATCHING PATTERN "*.h") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")