Guest User

Untitled

a guest
Aug 5th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 5.08 KB | None | 0 0
  1. #############################################################################
  2. # The Falcon Programming language
  3. #
  4. # CMake configuration file for Core falcon
  5. ##############################################################################
  6. #
  7. ##  Control Variables
  8. #
  9. # FALCON_BIN_DIR    - Prefix for binary installation. Defaults to "bin"
  10. # FALCON_INC_DIR    - Prefix for installation of include files.
  11. # FALCON_LIB_DIR    - Prefix for installation of archives and dynamic libraries
  12. #                     on UNIXes. Defaults to "lib".
  13. # FALCON_MOD_DIR    - Prefix for installation of modules. Defaults to
  14. #                     $FALCON_LIB_DIR/falcon on UNICES, and bin/ on windows.
  15. # FALCON_MAN_DIR    - Where manual pages are stored (below prefix)
  16. # FALCON_SHARE_DIR  - Where to install falcon share files
  17. # FALCON_CMAKE_DIR  - Where to install FalconConfig.cmake & c
  18. #
  19. ##  Options
  20. #
  21. # FALCON_SKIP_BISON         - Turn ON to avoid using bison.
  22. # FALCON_WITH_MANPAGES      - Turn ON to build and install man pages.
  23. # FALCON_BUILD_FEATHERS     - Turn OFF to skip building Feathers.
  24. # FALCON_BUILD_MODULES      - Turn OFF to skip building Falcon modules.
  25. # FALCON_BUILD_NATMODS      - Turn OFF to skip building other binary native modules.
  26. # FALCON_BUILD_APPS         - Turn ON to install installing Falcon applications.
  27. # FALCON_BUILD_FWKS         - Turn OFF to skip installing Falcon frameworks.
  28. # FALCON_BUILD_DOCS         - Build automatic documentation
  29. #
  30. ##  Options For Native Modules
  31. #
  32. # FALCON_BUILD_*MODULE_NAME*    - ON to build a given module
  33. #
  34. # List of available modules: CURL DBI DBUS DYNLIB GD2 GTK PDF SDL
  35. #
  36.  
  37. cmake_minimum_required(VERSION 2.6.2)
  38. project(Falcon)
  39.  
  40.  
  41. ##################################################################
  42. # Falcon build environment setup
  43.  
  44. set(Falcon_IN_CORE_SOURCETREE on)
  45.  
  46. # Find the module for cmake that we generate before install
  47. set( Falcon_DIR "${CMAKE_CURRENT_BINARY_DIR}/devtools" )
  48. #set( faldoc_DIR "${CMAKE_CURRENT_BINARY_DIR}/apps/faldoc")
  49.  
  50. # Add source include files at those generated by the module
  51. list(APPEND Falcon_INCLUDE_DIRS
  52.    "${CMAKE_CURRENT_SOURCE_DIR}/include"
  53.    "${CMAKE_CURRENT_SOURCE_DIR}/modules/native/feathers/include"
  54. )
  55.  
  56. include(detail.cmake)
  57.  
  58.  
  59. ##################################################################
  60. # CMAKE environment setup
  61. list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
  62.  
  63. #########################################################à
  64. # List of files to be installed as docs
  65. #
  66.  
  67. set( doc_files
  68.       AUTHORS
  69.       BUILDING
  70.       ChangeLog
  71.       copyright
  72.       LICENSE
  73.       README
  74.       README.editline
  75.       README.mersenne
  76.       TODO
  77.       LICENSE_GPLv2
  78.       RELNOTES
  79.    )
  80.  
  81. install(
  82.    FILES ${doc_files}
  83.    DESTINATION ${FALCON_SHARE_DIR} )
  84.  
  85. #########################################################à
  86. # Subdirectories
  87. #
  88.  
  89. #collect the include files in FALCON_HEADER
  90. add_subdirectory(include)
  91. #
  92. add_subdirectory(engine)
  93. add_subdirectory(clt)
  94. #
  95. add_subdirectory(devtools)
  96.  
  97. add_custom_target(falcon-core)
  98.  
  99. #########################################################################
  100. # Feathers?
  101. #
  102. if( FALCON_BUILD_FEATHERS )
  103.    message( STATUS "Adding FEATHERS to this build" )
  104.  
  105.    #override settings for the include dirs
  106.    list( APPEND Falcon_INCLUDE_DIRS
  107.       "${CMAKE_CURRENT_BINARY_DIR}/include" )
  108.  
  109.    add_subdirectory( modules/native/feathers )
  110.  
  111. else()
  112.     message( STATUS "Not building feathers" )
  113. endif()
  114.  
  115.  
  116.  
  117. #########################################################################
  118. # Modules?
  119. #
  120. if( FALCON_BUILD_NATMODS )
  121.     message( STATUS "Adding native binary modules to this build" )
  122.     add_subdirectory( modules/native )
  123. else()
  124.     message( STATUS "Not building binary native modules" )
  125. endif()
  126.  
  127. if( FALCON_BUILD_MODULES )
  128.     message( STATUS "Adding Falcon modules to this build" )
  129.     add_subdirectory( modules/falcon )
  130. else()
  131.     message( STATUS "Not building modules" )
  132. endif()
  133.  
  134. if( FALCON_BUILD_FWKS )
  135.     message( STATUS "Adding frameworks to this build" )
  136.     add_subdirectory( frameworks )
  137. else()
  138.     message( STATUS "Not building frameworks" )
  139. endif()
  140.  
  141. if( FALCON_BUILD_APPS )
  142.     message( STATUS "Adding applications to this build" )
  143.     add_subdirectory( apps )
  144. else()
  145.     message( STATUS "Not building applications" )
  146. endif()
  147.  
  148. if( FALCON_BUILD_DOCS )
  149.     message( STATUS "Adding documentation to this build" )
  150.     add_subdirectory( docs )
  151. else()
  152.     message( STATUS "Not building documentation" )
  153. endif()
  154.  
  155. #Generate make distro scripts
  156. if( FALCON_BUILD_DIST )
  157.     add_subdirectory( dist )
  158. endif()
  159.  
  160. if( FALCON_INSTALL_TESTS )
  161.     message( STATUS "Adding (source) tests, samples and demos to the distribution" )
  162.     add_subdirectory( tests )
  163. else()
  164.     message( STATUS "Not installing tests" )
  165. endif()
  166.  
  167. # CMake generated information.  Is used by our falcon-config.cmake
  168. if (NOT FALCON_CMAKE_DIR)
  169.    if(WIN32)
  170.       set(FALCON_CMAKE_DIR cmake)
  171.    else()
  172.       set(FALCON_CMAKE_DIR ${FALCON_SHARE_DIR}/cmake)
  173.    endif()
  174. endif()
  175.  
  176. install(EXPORT falcon-core-targets
  177.   DESTINATION ${FALCON_CMAKE_DIR}
  178. )
Add Comment
Please, Sign In to add comment