Changeset 20060 for trunk


Ignore:
Timestamp:
04/12/21 11:36:55 (4 years ago)
Author:
tbretz
Message:
Allow compilation without v8, minor fixes to boost hacks, moved miniftmctrl to fact part
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/CMakeLists.txt

    r20045 r20060  
    180180FIND_PACKAGE(Readline REQUIRED)
    181181FIND_PACKAGE(Panel    REQUIRED)
    182 FIND_PACKAGE(V8       REQUIRED)
    183182FIND_PACKAGE(CCfits   REQUIRED)  # First as Cfitsio is a dependency
    184183FIND_PACKAGE(Cfitsio  REQUIRED)
    185184FIND_PACKAGE(OpenSSL  REQUIRED)  # Required for boost::asio::ssl
     185
     186FIND_PACKAGE(V8)
     187IF (V8_INCLUDE_DIR AND V8_LIBRARY)
     188        INCLUDE_DIRECTORIES(${V8_INCLUDE_DIR})
     189ELSE()
     190        MESSAGE(WARNING
     191            " \n"
     192            " libv8 not found!\n"
     193            " dimctrl/dimserver disabled!")
     194ENDIF()
    186195
    187196ENDIF(NOT TOOLS_ONLY)
     
    247256        thread)
    248257
    249 IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND Boost_VERSION LESS 106000 AND NOT NO_BOOST_HACK)
     258IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND Boost_VERSION VERSION_LESS 1.60 AND NOT NO_BOOST_HACK)
    250259    MESSAGE(STATUS "Setting BOOST_REGEX_NO_EXTERNAL_TEMPLATES")
    251260    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_REGEX_NO_EXTERNAL_TEMPLATES=1")
     
    756765MANPAGE(zfits "")
    757766
     767ADD_EXECUTABLE(fixfits src/fixfits.cc)
     768TARGET_LINK_LIBRARIES(fixfits ${HELP++LIBS} ZLIB::ZLIB)
     769MANPAGE(fixfits "FACT++ - fixfits - Fix the header of a none closed raw-data file")
     770
    758771IF(NOT NO_ROOT)
    759772   ADD_EXECUTABLE(calcsource src/calcsource.cc)
     
    848861MANPAGE(datalogger "")
    849862
    850 ADD_EXECUTABLE(dimctrl src/dimctrl.cc
    851         src/StateMachineDimControl.cc
    852         src/RemoteControl.cc
    853         src/InterpreterV8.cc
    854         src/DimState.cc)
    855 TARGET_LINK_LIBRARIES(dimctrl ${FACT++LIBS} Pointing ZLIB::ZLIB v8)
    856 MANPAGE(dimctrl "")
    857 
    858 ADD_CUSTOM_TARGET(dimserver ALL
    859         COMMAND ln -sf dimctrl dimserver
    860         COMMENT "Creating symlink for dimserver"
    861         DEPENDS dimctrl)
     863IF (V8_INCLUDE_DIR AND V8_LIBRARY)
     864        ADD_EXECUTABLE(dimctrl src/dimctrl.cc
     865                src/StateMachineDimControl.cc
     866                src/RemoteControl.cc
     867                src/InterpreterV8.cc
     868                src/DimState.cc)
     869        TARGET_LINK_LIBRARIES(dimctrl ${FACT++LIBS} Pointing ZLIB::ZLIB v8)
     870        MANPAGE(dimctrl "")
     871
     872        ADD_CUSTOM_TARGET(dimserver ALL
     873                COMMAND ln -sf dimctrl dimserver
     874                COMMENT "Creating symlink for dimserver"
     875                DEPENDS dimctrl)
     876ENDIF()
    862877
    863878ADD_EXECUTABLE(drivectrl src/drivectrl.cc)
     
    888903MANPAGE(fscctrl "")
    889904
    890 ADD_EXECUTABLE(ftmctrl src/ftmctrl.cc src/HeadersFTM.cc)
    891 TARGET_LINK_LIBRARIES(ftmctrl ${FACT++LIBS})
    892 MANPAGE(ftmctrl "")
     905ADD_EXECUTABLE(miniftmctrl src/miniftmctrl.cc)
     906TARGET_LINK_LIBRARIES(miniftmctrl ${FACT++LIBS})
     907MANPAGE(miniftmctrl "")
     908
     909IF(NOT FOUND_FAMOUS)
     910    ADD_EXECUTABLE(ftmctrl src/ftmctrl.cc src/HeadersFTM.cc)
     911    TARGET_LINK_LIBRARIES(ftmctrl ${FACT++LIBS})
     912    MANPAGE(ftmctrl "")
     913ELSE()
     914    ADD_CUSTOM_TARGET(ftmctrl ALL
     915        COMMAND ln -sf miniftmctrl ftmctrl
     916        COMMENT "Creating symlink for ftmctrl"
     917        DEPENDS miniftmctrl)
     918ENDIF()
    893919
    894920ADD_EXECUTABLE(gcn src/gcn.cc)
     
    10861112        TARGET_LINK_LIBRARIES(ftuctrl ${FACT++LIBS})
    10871113        MANPAGE(ftuctrl "")
    1088 
    1089         ADD_EXECUTABLE(miniftmctrl famous/src/miniftmctrl.cc)
    1090         TARGET_LINK_LIBRARIES(miniftmctrl ${FACT++LIBS})
    1091         MANPAGE(miniftmctrl "")
    10921114
    10931115        ADD_EXECUTABLE(fpgaftmctrl famous/src/fpgaftmctrl.cc)
Note: See TracChangeset for help on using the changeset viewer.