CMakeLists.txt 594 B

12345678910111213141516171819
  1. cmake_minimum_required(VERSION 2.6)
  2. PROJECT(rpcd-mod-lxc)
  3. ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations)
  4. INCLUDE_DIRECTORIES(include)
  5. FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
  6. SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
  7. SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
  8. SET(SOURCES lxc.c)
  9. ADD_LIBRARY(rpcd-mod-lxc SHARED ${SOURCES})
  10. FIND_LIBRARY(lxc NAMES lxc liblxc)
  11. TARGET_LINK_LIBRARIES(rpcd-mod-lxc ${lxc})
  12. SET_TARGET_PROPERTIES(rpcd-mod-lxc PROPERTIES OUTPUT_NAME lxc PREFIX "")
  13. INSTALL(TARGETS rpcd-mod-lxc LIBRARY DESTINATION lib)