"Fossies" - the Fresh Open Source Software Archive

Member "snort3_extra-3.0.3-1/templates/CMakeLists.txt.erb" (23 Sep 2020, 1478 Bytes) of package /linux/misc/snort3_extra-3.0.3-1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) ERB Templates source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 %if @generate.project_boilerplate
    2 cmake_minimum_required ( VERSION 3.4.3 )
    3 project ( <%= @project.name %><% if @project.language == "CXX" %> CXX<% elsif @project.language == "C" %> C<% end %> )
    4 %end
    5 %if !@project.sources.empty?
    6 %if @generate.platform_boilerplate
    7 
    8 %if @project.language == "CXX"
    9 set (CMAKE_CXX_STANDARD 14)
   10 set (CMAKE_CXX_STANDARD_REQUIRED ON)
   11 set (CMAKE_CXX_EXTENSIONS OFF)
   12 %elsif @project.language == "C"
   13 set (CMAKE_C_STANDARD 99)
   14 set (CMAKE_C_STANDARD_REQUIRED ON)
   15 set (CMAKE_C_EXTENSIONS ON)
   16 %end
   17 
   18 if ( APPLE )
   19     set ( CMAKE_MACOSX_RPATH OFF )
   20 endif ( APPLE )
   21 %end
   22 
   23 include ( FindPkgConfig )
   24 pkg_search_module ( SNORT3 REQUIRED snort>=3 )
   25 
   26 add_library (
   27     <%= @project.libname %> MODULE
   28 %for source in @project.sources
   29     <%= source %>
   30 %end
   31 )
   32 
   33 if ( APPLE )
   34     set_target_properties (
   35         <%= @project.libname %>
   36         PROPERTIES
   37             LINK_FLAGS "-undefined dynamic_lookup"
   38     )
   39 endif ( APPLE )
   40 
   41 set_target_properties (
   42     <%= @project.libname %>
   43     PROPERTIES
   44         PREFIX ""
   45 )
   46 
   47 target_include_directories (
   48     <%= @project.libname %> PUBLIC
   49     ${SNORT3_INCLUDE_DIRS}
   50 )
   51 
   52 install (
   53     TARGETS <%= @project.libname %>
   54     LIBRARY
   55         DESTINATION "${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}/<%= @project.dirname %>"
   56 )
   57 %end
   58 %if !@project.scripts.empty?
   59 
   60 install (
   61     FILES<% for script in @project.scripts %> <%= script %><% end %>
   62     DESTINATION "${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}/<%= @project.dirname %>"
   63 )
   64 %end