You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.5 KiB

  1. cmake_minimum_required (VERSION 2.8.6)
  2. # Set project name
  3. project (ltl2dstar CXX C)
  4. # Main Sources
  5. file(GLOB_RECURSE LTL2DSTAR_HEADERS ${PROJECT_SOURCE_DIR}/src/*.hpp)
  6. file(GLOB_RECURSE LTL2DSTAR_SOURCES ${PROJECT_SOURCE_DIR}/src/*.cpp)
  7. # Add base folder for better inclusion paths
  8. include_directories("${PROJECT_SOURCE_DIR}")
  9. include_directories("${PROJECT_SOURCE_DIR}/src")
  10. set(Boost_USE_STATIC_LIBS ON)
  11. set(Boost_USE_MULTITHREADED ON)
  12. set(Boost_USE_STATIC_RUNTIME OFF)
  13. find_package(Boost REQUIRED)
  14. if(Boost_FOUND)
  15. if ((NOT Boost_LIBRARY_DIRS) OR ("${Boost_LIBRARY_DIRS}" STREQUAL ""))
  16. set(Boost_LIBRARY_DIRS "${Boost_INCLUDE_DIRS}/stage/lib")
  17. endif ()
  18. message(STATUS "BOOST_INCLUDE_DIRS is ${Boost_INCLUDE_DIRS}")
  19. message(STATUS "BOOST_LIBRARY_DIRS is ${Boost_LIBRARY_DIRS}")
  20. include_directories(${Boost_INCLUDE_DIRS})
  21. link_directories(${Boost_LIBRARY_DIRS})
  22. endif(Boost_FOUND)
  23. if(MSVC)
  24. # required for GMM to compile, ugly error directive in their code
  25. add_definitions(/D_SCL_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS)
  26. # required as the PRCTL Parser bloats object files (COFF) beyond their maximum size (see http://msdn.microsoft.com/en-us/library/8578y171(v=vs.110).aspx)
  27. add_definitions(/bigobj)
  28. endif()
  29. # Add the executables
  30. # Must be created *after* Boost was added because of LINK_DIRECTORIES
  31. add_library(ltl2dstar ${LTL2DSTAR_SOURCES} ${LTL2DSTAR_HEADERS})
  32. # Add target link deps for Boost program options
  33. target_link_libraries(ltl2dstar ${Boost_LIBRARIES})