cmake_minimum_required(VERSION 2.8) project(libthecore C) # Find source files file(GLOB SOURCES "src/*.c" "include/*.h" ) # Include header files include_directories("include") # Create shared library add_library(${PROJECT_NAME} STATIC ${SOURCES}) # Find dependencies find_package(Boost REQUIRED) # Link dependencies if found if (Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES}) endif (Boost_FOUND)