CMakeLists.txt 545 B

123456789101112131415161718
  1. cmake_minimum_required(VERSION 3.15)
  2. project(DownstreamComponents)
  3. # specify the C++ standard
  4. set(CMAKE_CXX_STANDARD 11)
  5. set(CMAKE_CXX_STANDARD_REQUIRED True)
  6. # find MathFunctions
  7. find_package(MathFunctions 3.4 COMPONENTS Addition SquareRoot)
  8. # create executable
  9. add_executable(myexe main.cc)
  10. # use MathFunctions library
  11. target_link_libraries(myexe PRIVATE MathFunctions::Addition MathFunctions::SquareRoot)
  12. # Workaround for GCC on AIX to avoid -isystem, not needed in general.
  13. set_property(TARGET myexe PROPERTY NO_SYSTEM_FROM_IMPORTED 1)