2
0

CMakeLists.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Arnaldo M Pereira <arnaldo@sangoma.com>
  3. #
  4. CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
  5. PROJECT(mod_freetdm)
  6. IF(NOT DEFINED WIN32)
  7. ADD_DEFINITIONS(-g -O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0 -g -ggdb -DPACKAGE_NAME=\"freetdm\" -DPACKAGE_TARNAME=\"freetdm\" -DPACKAGE_VERSION=\"pre-alpha\" -DPACKAGE_STRING=\"freetdm\ pre-alpha\" -DPACKAGE_BUGREPORT=\"bugs@freeswitch.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libfreetdm\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBM=1 -DSIZEOF_LONG=8 -DHAVE_NETINET_SCTP_H=1 -DHAVE_NETDB_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_GETHOSTBYNAME_R=1) # -DDEBUG=/\*\*/)
  8. ENDIF(NOT DEFINED WIN32)
  9. # includes
  10. SET(mod_freetdm_INCLUDES
  11. ${PROJECT_SOURCE_DIR}/../src/include
  12. ${PROJECT_SOURCE_DIR}/../src/isdn/include
  13. ${PROJECT_SOURCE_DIR}/../../libteletone/src
  14. ${PROJECT_SOURCE_DIR}/../../../src/include
  15. )
  16. INCLUDE_DIRECTORIES(${mod_freetdm_INCLUDES})
  17. LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/..)
  18. ADD_LIBRARY(${PROJECT_NAME} SHARED mod_freetdm.c)
  19. TARGET_LINK_LIBRARIES(${PROJECT_NAME} freetdm -fPIC -Werror -fvisibility=hidden)
  20. IF(DEFINED WIN32)
  21. SET(EXT lib)
  22. ELSE(DEFINED WIN32)
  23. SET(EXT so)
  24. ENDIF(DEFINED WIN32)
  25. ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
  26. COMMAND ${CMAKE_COMMAND} -E rename lib${PROJECT_NAME}.${EXT} ${PROJECT_NAME}.${EXT}
  27. )