2018-12-10 07:21 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002625LibCSSLibCSSpublic2018-10-23 19:41
ReporterJ. Peter Mugaas 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusacknowledgedResolutionopen 
Platformmingw-w64OSWindowsOS Version10
Summary0002625: contribution - cmake-based build system for libcss
DescriptionPlease feel free to use this build-system in your projects. This is the CMakeLists.txt that you should place in you the top libcss-0.8.0 folder. I am pleased to report that I have succesfully build this library in both static and shared forms and that this does pass 100% of the uncommented tests.

This build system also directly supports cross-compiling but you do need to build gen_parser for your host system and specify it in the "CSS_GEN_PARSER_EXECUTABLE" variable using something like: -DCSS_GEN_PARSER_EXECUTABLE="my_gen_parser".
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #
Attached Files
  • txt file icon CMakeLists.txt (43,284 bytes) 2018-09-29 21:41 -
    cmake_minimum_required (VERSION 2.6)
    project (libcss)
    include(GNUInstallDirs)
    include(FindPkgConfig)
    enable_testing()
    include( CTest )
    
    #Obligitory version and copyright for pkg-config file and version info
    #as well as possibly, automated installers.
    set(CSS_COMPONENT_NAME "css")
    set(CSS_AUTHOR "John-Mark Bell <jmb@netsurf-browser.org>")
    set(CSS_COPYRIGHT "Copyright 2009-2015 John-Mark Bell <jmb@netsurf-browser.org>")
    set(CSS_DESCRIPTION "CSS parsing and selection library")
    set(CSS_VERSION_MAJOR 0)
    set(CSS_VERSION_MINOR 8)
    set(CSS_VERSION_PATCH 0)
    set(CSS_SOVERSION ${CSS_VERSION_MAJOR}.${CSS_VERSION_MINOR}.${CSS_VERSION_PATCH})
    
    #Do not prefix BUILD_SHARED_LIBS and BUILD_STATIC_LIBS because those are standard cmake options
    #We only put them in the menu for convenience.
    option(BUILD_SHARED_LIBS "Build shared libraries" ON)
    option(BUILD_STATIC_LIBS "Build static libraries" ON)
    option(CSS_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
    option(CSS_RUN_DISABLED_TESTS "Run tests that the authors commented out" OFF)
    set(CSS_GEN_PARSER_EXECUTABLE CACHE FILEPATH "gen_parser program executable (required only for cross-compiling)")
    if(CMAKE_COMPILER_IS_GNUCC)
    set(CSS_WARNFLAGS -Wall -W -Wundef -Wpointer-arith -Wcast-align
            -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
            -Wmissing-declarations -Wnested-externs)
    endif(CMAKE_COMPILER_IS_GNUCC)
    
    set(CSS_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
    set(CSS_ADDITIONAL_C_FILES
       ${CMAKE_SOURCE_DIR}/src/stylesheet.h
       ${CMAKE_SOURCE_DIR}/src/stylesheet.c
       ${CMAKE_SOURCE_DIR}/src/charset/detect.h
       ${CMAKE_SOURCE_DIR}/src/charset/detect.c
       ${CMAKE_SOURCE_DIR}/src/lex/lex.h
       ${CMAKE_SOURCE_DIR}/src/lex/lex.c
       ${CMAKE_SOURCE_DIR}/src/bytecode/bytecode.h
       ${CMAKE_SOURCE_DIR}/src/utils/errors.c 
       ${CMAKE_SOURCE_DIR}/src/utils/utils.c
       ${CMAKE_SOURCE_DIR}/src/parse/parse.c
       ${CMAKE_SOURCE_DIR}/src/parse/language.h
       ${CMAKE_SOURCE_DIR}/src/parse/language.c
       ${CMAKE_SOURCE_DIR}/src/parse/important.c
       ${CMAKE_SOURCE_DIR}/src/parse/propstrings.c
       ${CMAKE_SOURCE_DIR}/src/parse/font_face.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/azimuth.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/background.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/background_position.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/border.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/border_color.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/border_spacing.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/border_style.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/border_width.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/clip.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/columns.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/column_rule.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/content.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/cue.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/cursor.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/elevation.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/flex.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/flex_flow.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/font.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/font_family.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/font_weight.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/list_style.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/list_style_type.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/margin.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/opacity.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/outline.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/overflow.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/padding.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/pause.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/play_during.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/properties.h
       ${CMAKE_SOURCE_DIR}/src/parse/properties/properties.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/quotes.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/text_decoration.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/utils.c
       ${CMAKE_SOURCE_DIR}/src/parse/properties/voice_family.c
       ${CMAKE_SOURCE_DIR}/src/select/autogenerated_computed.h
       ${CMAKE_SOURCE_DIR}/src/select/autogenerated_computed.h
       ${CMAKE_SOURCE_DIR}/src/select/arena.h
       ${CMAKE_SOURCE_DIR}/src/select/arena.c
       ${CMAKE_SOURCE_DIR}/src/select/computed.h
       ${CMAKE_SOURCE_DIR}/src/select/computed.c
       ${CMAKE_SOURCE_DIR}/src/select/dispatch.h
       ${CMAKE_SOURCE_DIR}/src/select/dispatch.c
       ${CMAKE_SOURCE_DIR}/src/select/hash.h
       ${CMAKE_SOURCE_DIR}/src/select/hash.c
       ${CMAKE_SOURCE_DIR}/src/select/select.h
       ${CMAKE_SOURCE_DIR}/src/select/select.c
       ${CMAKE_SOURCE_DIR}/src/select/font_face.h
       ${CMAKE_SOURCE_DIR}/src/select/font_face.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/helpers.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/align_content.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/align_items.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/align_self.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/azimuth.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/background_attachment.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/background_color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/background_image.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/background_position.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/background_repeat.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_bottom_color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_bottom_style.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_bottom_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_collapse.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_left_color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_left_style.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_left_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_right_color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_right_style.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_right_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_spacing.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_top_color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_top_style.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/border_top_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/bottom.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/box_sizing.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/break_after.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/break_before.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/break_inside.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/caption_side.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/clear.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/clip.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_count.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_fill.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_gap.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_rule_color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_rule_style.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_rule_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_span.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/column_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/content.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/counter_increment.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/counter_reset.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/cue_after.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/cue_before.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/cursor.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/direction.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/display.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/elevation.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/empty_cells.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/flex_basis.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/flex_direction.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/flex_grow.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/flex_shrink.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/flex_wrap.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/float.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/font_family.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/font_size.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/font_style.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/font_variant.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/font_weight.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/height.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/justify_content.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/left.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/letter_spacing.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/line_height.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/list_style_image.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/list_style_position.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/list_style_type.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/margin_bottom.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/margin_left.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/margin_right.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/margin_top.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/max_height.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/max_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/min_height.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/min_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/opacity.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/order.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/orphans.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/outline_color.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/outline_style.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/outline_width.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/overflow_x.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/overflow_y.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/padding_bottom.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/padding_left.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/padding_right.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/padding_top.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/page_break_after.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/page_break_before.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/page_break_inside.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/pause_after.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/pause_before.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/pitch.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/pitch_range.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/play_during.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/position.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/quotes.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/richness.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/right.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/speech_rate.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/speak.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/speak_header.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/speak_numeral.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/speak_punctuation.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/stress.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/table_layout.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/text_align.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/text_decoration.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/text_indent.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/text_transform.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/top.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/unicode_bidi.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/vertical_align.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/visibility.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/voice_family.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/volume.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/white_space.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/widows.c 
       ${CMAKE_SOURCE_DIR}/src/select/properties/width.c 
       ${CMAKE_SOURCE_DIR}/src/select/properties/word_spacing.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/writing_mode.c
       ${CMAKE_SOURCE_DIR}/src/select/properties/z_index.c)
    set(CSS_PUBLIC_HEADER_FILES
       include/libcss/computed.h
       include/libcss/errors.h
       include/libcss/font_face.h
       include/libcss/fpmath.h
       include/libcss/functypes.h
       include/libcss/hint.h
       include/libcss/libcss.h
       include/libcss/properties.h
       include/libcss/select.h
       include/libcss/stylesheet.h
       include/libcss/types.h)
    include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/include)
    # setup any additional libs required by this.
    set(CSS_ADDITIONAL_LIBS "")
    set(CSS_ADDITIONAL_DIRS "")
    set(CSS_ADDITIONAL_DEFS "")
    
    # From: https://gitlab.kitware.com/cmake/community/wikis/contrib/macros/TestInline
    # Inspired from /usr/share/autoconf/autoconf/c.m4
    # I put it here to replace the GCCISM inline="__inline__"
    set(TEST_C "/* Test source lifted from /usr/share/autoconf/autoconf/c.m4 */
    typedef int foo_t;
    static inline foo_t static_foo(){return 0;}
    foo_t foo(){return 0;}
    int main(int argc, char *argv[]){return 0;}")
    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_inline.c "${TEST_C}")
    FOREACH(KEYWORD "inline" "__inline__" "__inline")
       IF(NOT DEFINED C_INLINE)
         TRY_COMPILE(C_HAS_${KEYWORD} "${CMAKE_CURRENT_BINARY_DIR}"
           "${CMAKE_CURRENT_BINARY_DIR}/test_inline.c"
           COMPILE_DEFINITIONS "-Dinline=${KEYWORD}")
         IF(C_HAS_${KEYWORD})
           SET(C_INLINE TRUE)
           ADD_DEFINITIONS("-Dinline=${KEYWORD}")
         ENDIF(C_HAS_${KEYWORD})
       ENDIF(NOT DEFINED C_INLINE)
    ENDFOREACH(KEYWORD)
    IF(NOT DEFINED C_INLINE)
       ADD_DEFINITIONS("-Dinline=")
    ENDIF(NOT DEFINED C_INLINE)
    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_inline.c)
    
    if(CMAKE_CROSSCOMPILING)
      if(NOT CSS_GEN_PARSER_EXECUTABLE)
        message(FATAL_ERROR "CSS_GEN_PARSER_EXECUTABLE must be set to the fully-qualified name of the gen_parser executable")
      endif(NOT CSS_GEN_PARSER_EXECUTABLE)
    else()
      if(NOT CSS_GEN_PARSER_EXECUTABLE)
        try_compile(CSS_GEN_PARSER_COMPILED ${CSS_BUILD_DIR} SOURCES ${CMAKE_SOURCE_DIR}/src/parse/properties/css_property_parser_gen.c
          COPY_FILE ${CSS_BUILD_DIR}/gen_parser${CMAKE_EXECUTABLE_SUFFIX} OUTPUT_VARIABLE CSS_GEN_PARSE_RES) 
        if(NOT CSS_GEN_PARSER_COMPILED)
          message(FATAL_ERROR "Generating gen_parser${CMAKE_EXECUTABLE_SUFFIX} - Failed")
        else()
          set(CSS_GEN_PARSER_EXECUTABLE ${CSS_BUILD_DIR}/gen_parser${CMAKE_EXECUTABLE_SUFFIX})
          message(STATUS "Generating gen_parser${CMAKE_EXECUTABLE_SUFFIX} - Done")
        endif(NOT CSS_GEN_PARSER_COMPILED)
      endif(NOT CSS_GEN_PARSER_EXECUTABLE)
    endif(CMAKE_CROSSCOMPILING)
    
    file(READ ${CMAKE_SOURCE_DIR}/src/parse/properties/properties.gen CSS_AUTOGEN_PARSERS)
    #This is from: https://cmake.org/pipermail/cmake/2007-May/014236.html
    STRING(REGEX REPLACE ";" "\\\\;" CSS_AUTOGEN_PARSERS "${CSS_AUTOGEN_PARSERS}")
    STRING(REGEX REPLACE "\n" ";" CSS_AUTOGEN_PARSERS "${CSS_AUTOGEN_PARSERS}")
    file(MAKE_DIRECTORY ${CSS_BUILD_DIR}/src/parse/properties)
    foreach(CSS_AUTOGEN_LINE ${CSS_AUTOGEN_PARSERS})
      string(SUBSTRING "${CSS_AUTOGEN_LINE}" 0 1 CSS_CHAR )
      if(NOT(${CSS_CHAR} STREQUAL "#") AND NOT(${CSS_CHAR} STREQUAL ":"))
        string(FIND "${CSS_AUTOGEN_LINE}" ":" CSS_LINE_index)
        if(${CSS_LINE_index} LESS 0)
        else()  
          string(SUBSTRING "${CSS_AUTOGEN_LINE}" 0 "${CSS_LINE_index}" CSS_CUR_FNAME)
          message(STATUS "GENERATING: autogenerated_${CSS_CUR_FNAME}.c")
          set(CSS_CUR_FQNAME "${CSS_BUILD_DIR}/src/parse/properties/autogenerated_${CSS_CUR_FNAME}.c")
          execute_process(
            COMMAND ${CSS_GEN_PARSER_EXECUTABLE} -o ${CSS_CUR_FQNAME} ${CSS_AUTOGEN_LINE})
          set(CSS_ADDITIONAL_C_FILES ${CSS_ADDITIONAL_C_FILES} ${CSS_CUR_FQNAME})
        endif()
      endif()
    endforeach(CSS_AUTOGEN_LINE)
    
    if(PKG_CONFIG_FOUND)
        pkg_check_modules(libparserutils REQUIRED libparserutils)
        list(APPEND CSS_ADDITIONAL_DIRS ${libparserutils_INCLUDEDIR})
        list(APPEND CSS_ADDITIONAL_LIBS ${libparserutils_LIBRARIES})
    else()
        find_library(parserutils CSS_LIBPARSEERUTILS_LIB)
        if (CSS_LIBPARSEERUTILS_LIB)
          list(APPEND CSS_ADDITIONAL_LIBS ${CSS_LIBPARSEERUTILS})
        else()
          message(FATAL_ERROR "Parseutils not found")
        endif(CSS_LIBPARSEERUTILS_LIB)
    endif(PKG_CONFIG_FOUND)
    if(PKG_CONFIG_FOUND)
        pkg_check_modules(libwapcaplet REQUIRED libwapcaplet)
        list(APPEND CSS_ADDITIONAL_DIRS ${libwapcaplet_INCLUDEDIR})
        list(APPEND CSS_ADDITIONAL_LIBS ${libwapcaplet_LIBRARIES})
    else()
        find_library(wapcaplet CSS_libwapcaplet_LIB)
        if (CSS_libwapcaplet_LIB)
          list(APPEND CSS_ADDITIONAL_LIBS ${CSS_libwapcaplet_LIB})
        else()
          message(FATAL_ERROR "wapcaple not found")
        endif(HUBBUB_HUBBUB_LIB)
    endif(PKG_CONFIG_FOUND)
    
    if(BUILD_SHARED_LIBS)
       if(CMAKE_RC_COMPILER)
          # Make .rc file  
          set(CSS_RC_CONTENTS "1 VERSIONINFO
    FILEVERSION     ${CSS_VERSION_MAJOR},${CSS_VERSION_MINOR},${CSS_VERSION_PATCH},0
    PRODUCTVERSION  ${CSS_VERSION_MAJOR},${CSS_VERSION_MINOR},${CSS_VERSION_PATCH},0
    BEGIN
      BLOCK \"StringFileInfo\"
      BEGIN
        BLOCK \"040904E4\"
        BEGIN
          VALUE \"CompanyName\", \"${CSS_AUTHOR}\"
          VALUE \"FileDescription\", \"${CSS_DESCRIPTION}\"
          VALUE \"FileVersion\", \"${CSS_VERSION_MAJOR}.${CSS_VERSION_MINOR}.${CSS_VERSION_PATCH}\"
          VALUE \"InternalName\", \"${CMAKE_SHARED_MODULE_PREFIX}${CSS_COMPONENT_NAME}\"
          VALUE \"LegalCopyright\", \"${CSS_COPYRIGHT}\"
          VALUE \"OriginalFilename\", \"${CMAKE_SHARED_MODULE_PREFIX}${CSS_COMPONENT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}\"
          VALUE \"ProductName\", \"${CSS_COMPONENT_NAME}\"
          VALUE \"ProductVersion\", \"${CSS_VERSION_MAJOR}.${CSS_VERSION_MINOR}.${CSS_VERSION_PATCH}\"
        END
      END
      BLOCK \"VarFileInfo\"
      BEGIN
        VALUE \"Translation\", 0x409, 1252
      END
    END")
        FILE(WRITE ${CSS_BUILD_DIR}/lib${CSS_COMPONENT_NAME}.rc "${CSS_RC_CONTENTS}")
        add_library(libcss_shared SHARED ${CSS_PUBLIC_HEADER_FILES} ${CSS_ADDITIONAL_C_FILES} ${CSS_BUILD_DIR}/lib${CSS_COMPONENT_NAME}.rc)
      else()
        add_library(libcss_shared SHARED ${CSS_PUBLIC_HEADER_FILES} ${CSS_ADDITIONAL_C_FILES} SOVERSION ${CSS_SOVERSION})
      endif()
      set_target_properties(libcss_shared PROPERTIES OUTPUT_NAME ${CSS_COMPONENT_NAME})
      if(CSS_ADDITIONAL_LIBS)
        target_link_libraries(libcss_shared PUBLIC ${CSS_ADDITIONAL_LIBS}) 
      endif(CSS_ADDITIONAL_LIBS)
      if(CSS_ADDITIONAL_DIRS)
        target_include_directories(libcss_shared PUBLIC ${CSS_ADDITIONAL_DIRS})
      endif(CSS_ADDITIONAL_DIRS)
      if(CSS_ADDITIONAL_DEFS)
        target_include_directories(libcss_shared PUBLIC ${CSS_ADDITIONAL_DEFS})
      endif(CSS_ADDITIONAL_DEFS)
      if(CMAKE_COMPILER_IS_GNUCC)
        target_compile_options(libcss_shared PRIVATE ${CSS_WARNFLAGS})
      endif(CMAKE_COMPILER_IS_GNUCC)
      install(TARGETS libcss_shared
          RUNTIME DESTINATION bin
          LIBRARY DESTINATION lib
          ARCHIVE DESTINATION lib)
    endif(BUILD_SHARED_LIBS)
    if(BUILD_STATIC_LIBS)
      add_library(libcss_static STATIC ${CSS_PUBLIC_HEADER_FILES} ${CSS_ADDITIONAL_C_FILES})
      set_target_properties(libcss_static PROPERTIES OUTPUT_NAME ${CSS_COMPONENT_NAME})
      if(CSS_ADDITIONAL_LIBS)
        target_link_libraries(libcss_static PUBLIC ${CSS_ADDITIONAL_LIBS}) 
      endif(CSS_ADDITIONAL_LIBS)
      if(CSS_ADDITIONAL_DIRS)
        target_include_directories(libcss_static PUBLIC ${CSS_ADDITIONAL_DIRS})
      endif(CSS_ADDITIONAL_DIRS)
      if(CSS_ADDITIONAL_DEFS)
        target_include_directories(libcss_static PUBLIC ${CSS_ADDITIONAL_DEFS})
      endif(CSS_ADDITIONAL_DEFS)
      if(CMAKE_COMPILER_IS_GNUCC)
        target_compile_options(libcss_static PRIVATE ${CSS_WARNFLAGS})
      endif(CMAKE_COMPILER_IS_GNUCC)
      install(TARGETS libcss_static
          RUNTIME DESTINATION bin
          LIBRARY DESTINATION lib
          ARCHIVE DESTINATION lib)
    endif(BUILD_STATIC_LIBS)
    
    #from: https://cmake.org/pipermail/cmake/2010-October/040246.html
    #This installs the headers into our hierarchy in the include file.
    foreach(CSS_HEADER ${CSS_PUBLIC_HEADER_FILES})
       string(REGEX MATCH "(.*)[/\\]" CSS_DIR ${CSS_HEADER})
       install(FILES ${CSS_HEADER} DESTINATION ${CSS_DIR})
    endforeach(CSS_HEADER ${CSS_PUBLIC_HEADER_FILES})
    
    if(CSS_WITH_PKGCONFIG_SUPPORT)
      set(CSS_PC ${CSS_BUILD_DIR}/lib${CSS_COMPONENT_NAME}.pc)
    
      # This stuff is necessary to ensure that the dependency list
      # in our .pc file is in the proper format
    #Make pkg-config
      set(CSS_EXC "${CMAKE_INSTALL_PREFIX}")
      set(CSS_INC "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
      set(CSS_LIB "${CMAKE_INSTALL_FULL_LIBDIR}")
      if("${CSS_EXC}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
        set(CSS_EXC "\${prefix}")
      endif()
      if ("${CSS_INC}" STREQUAL "${CMAKE_INSTALL_PREFIX}/include")
        set(CSS_INC "\${prefix}/include")
      endif()
      if ("${CSS_LIB}" STREQUAL "${CMAKE_INSTALL_PREFIX}/lib")
        set(CSS_LIB "\${exec_prefix}/lib")
      endif()
      set(CSS_DEPS "")
      foreach(CSS_LIB_DEP ${CSS_LIB_DEPEND_LIBS})
        set(CSS_DEPS "${CSS_DEPS} -l${CSS_LIB_DEP}")
      endforeach(CSS_LIB_DEP)
    
      set(CSS_PKGCONFIG_CONTENTS "prefix=${CMAKE_INSTALL_PREFIX}
    exec_prefix=${CSS_EXC}
    libdir=${CSS_LIB}
    includedir=${CSS_INC}
    
    Name: lib${CSS_COMPONENT_NAME}
    Description: ${CSS_DESCRIPTION}
    URL: http://www.netsurf-browser.org/projects/${CSS_COMPONENT_NAME}/
    Version: ${CSS_SOVERSION}
    Requires: libparserutils, libwapcaplet
    Cflags: -I\${includedir}
    Libs: -L\${libdir} -l${CSS_COMPONENT_NAME}
    Libs.private: ${CSS_DEPS}
    ")
      file(WRITE ${CSS_PC} ${CSS_PKGCONFIG_CONTENTS})
      install(FILES ${CSS_PC} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
    endif(CSS_WITH_PKGCONFIG_SUPPORT)
    
    #
    #Test section
    #
    if (BUILD_TESTING)
      if(BUILD_SHARED_LIBS)
        add_executable(csdetect_shared ${CMAKE_SOURCE_DIR}/test/csdetect.c)
        target_link_libraries(csdetect_shared libcss_shared)
        add_test(NAME Character_set_detection_shared__UTF_Byte_Order_Mark_detection_tests 
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/csdetect/
          COMMAND csdetect_shared bom.dat)
        add_test(NAME Character_set_detection_shared__BOM_+_@charset_tests 
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/csdetect/
          COMMAND csdetect_shared bom-charset.dat)
    
        if(CSS_RUN_DISABLED_TESTS)
          add_executable(css21_shared ${CMAKE_SOURCE_DIR}/test/css21.c)
          target_link_libraries(css21_shared libcss_shared)
          add_test(NAME Parsing_[SS2.1_specifics]_shared__Reasonably_simple_CSS_file_[semantically_invalid] 
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_shared simple.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_shared__All_CSS_Zen_Garden_stylesheets_concatenated
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_shared allzengarden.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_shared__Basic_blocks_and_at-rule_syntax
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_shared blocks.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_shared__Malformed_declarations_from_the_CSS_2.1_spec
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_shared malformed.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_shared__Comment_inside_[_..._]_lacks_starting_*
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_shared badcomment.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_shared__Various_@font-face_rules
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_shared fontface.css)
    
          add_executable(lex_shared ${CMAKE_SOURCE_DIR}/test/lex.c)
          target_link_libraries(lex_shared libcss_shared)
          add_test(NAME Lexing_shared__Reasonably_simple_CSS_file_[semantically_invalid] 
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_shared simple.css)
          add_test(NAME Lexing_shared__All_CSS_Zen_Garden_stylesheets_concatenated
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_shared allzengarden.css)
          add_test(NAME Lexing_shared__Basic_blocks_and_at-rule_syntax
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_shared blocks.css)
          add_test(NAME Lexing_shared__Malformed_declarations_from_the_CSS_2.1_spec
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_shared malformed.css)
          add_test(NAME Lexing_shared__Comment_inside_[_..._]_lacks_starting_*
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_shared badcomment.css)
          add_test(NAME Lexing_shared__Various_@font-face_rules
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_shared fontface.css)
        endif(CSS_RUN_DISABLED_TESTS)
    
        add_executable(lex-auto_shared ${CMAKE_SOURCE_DIR}/test/lex-auto.c)
        target_link_libraries(lex-auto_shared libcss_shared)
        add_test(NAME Automated_lexer_tests_shared__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/lex
          COMMAND lex-auto_shared tests1.dat)
        add_test(NAME Automated_lexer_tests_shared__More_complicated_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/lex
          COMMAND lex-auto_shared tests2.dat)
        add_test(NAME Automated_lexer_tests_shared__Regression_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/lex
          COMMAND lex-auto_shared regression.dat)
    
        add_executable(number_shared ${CMAKE_SOURCE_DIR}/test/number.c)
        target_link_libraries(number_shared libcss_shared)
        add_test(NAME Conversion_of_numbers_to_fixed_point_shared__Number_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/number
          COMMAND number_shared number.dat)
    
        if(CSS_DISABLED_TESTS)
          add_executable(parse_shared ${CMAKE_SOURCE_DIR}/test/parse.c)
          target_link_libraries(parse_shared libcss_shared)
          add_test(NAME Parsing_[core_syntax]_shared__Reasonably_simple_CSS_file_[semantically_invalid] 
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_shared simple.css)
          add_test(NAME Parsing_[core_syntax]_shared__All_CSS_Zen_Garden_stylesheets_concatenated
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_shared allzengarden.css)
          add_test(NAME Parsing_[core_syntax]_shared__Basic_blocks_and_at-rule_syntax
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_shared blocks.css)
          add_test(NAME Parsing_[core_syntax]_shared__Malformed_declarations_from_the_CSS_2.1_spec
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_shared malformed.css)
          add_test(NAME Parsing_[core_syntax]_shared__Comment_inside_[_..._]_lacks_starting_*
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_shared badcomment.css)
          add_test(NAME Parsing_[core_syntax]_shared__Various_@font-face_rules
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_shared fontface.css)
        endif(CSS_DISABLED_TESTS)
    
        add_executable(parse-auto_shared ${CMAKE_SOURCE_DIR}/test/parse-auto.c)
        target_link_libraries(parse-auto_shared libcss_shared)
        add_test(NAME  Automated_parser_tests_[bytecode]_shared__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_shared tests1.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_shared__Selectors
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_shared selectors.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_shared__@-rules
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_shared atrules.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_shared__Colour_values
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_shared colours.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_shared__HSL_Colour_values
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_shared colours-hsl.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_shared__:nth-*_expressions
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_shared nth.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_shared__Properties
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_shared properties.dat)
    
        add_executable(parse2-auto_shared ${CMAKE_SOURCE_DIR}/test/parse2-auto.c)
        target_link_libraries(parse2-auto_shared libcss_shared)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared tests1.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Unexpected_EOF_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared eof.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Comment_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared comments.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Invalid_selector_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared selectors.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Illegal_value_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared illegal-values.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Malformed_declaration_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared malformed-declarations.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Unknown_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared unknown-properties.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Illegal_background-position_values
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared bgpos.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Aural_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared au.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Background_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared bg.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Border_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared border.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Font_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared font.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__List_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared list.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Margin_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared margin.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Outline_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared outline.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Overflow_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared overflow.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Padding_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared padding.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Multi-column_layout_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared multicol.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Flexbox_properties_and_shorthands_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared flexbox.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_shared__Length_unit_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_shared units.dat)
    
        add_executable(select_shared ${CMAKE_SOURCE_DIR}/test/select.c)
        target_link_libraries(select_shared libcss_shared)
        add_test(NAME Automated_selection_engine_tests_shared__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/select
          COMMAND select_shared tests1.dat)
    
      endif(BUILD_SHARED_LIBS)
      if(BUILD_STATIC_LIBS)
        if(CSS_RUN_DISABLED_TESTS)
          add_executable(css21_static ${CMAKE_SOURCE_DIR}/test/css21.c)
          target_link_libraries(css21_static libcss_static)
          add_test(NAME Parsing_[SS2.1_specifics]_static__Reasonably_simple_CSS_file_[semantically_invalid] 
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_static simple.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_static__All_CSS_Zen_Garden_stylesheets_concatenated
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_static allzengarden.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_static__Basic_blocks_and_at-rule_syntax
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_static blocks.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_static__Malformed_declarations_from_the_CSS_2.1_spec
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_static malformed.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_static__Comment_inside_[_..._]_lacks_starting_*
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_static badcomment.css)
          add_test(NAME Parsing_[CSS2.1_specifics]_static__Various_@font-face_rules
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND csdetect_static fontface.css)
    
          add_executable(lex_static ${CMAKE_SOURCE_DIR}/test/lex.c)
          target_link_libraries(lex_static libcss_static)
          add_test(NAME Lexing_static__Reasonably_simple_CSS_file_[semantically_invalid] 
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_static simple.css)
          add_test(NAME Lexing_static__All_CSS_Zen_Garden_stylesheets_concatenated
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_static allzengarden.css)
          add_test(NAME Lexing_static__Basic_blocks_and_at-rule_syntax
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_static blocks.css)
          add_test(NAME Lexing_static__Malformed_declarations_from_the_CSS_2.1_spec
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_static malformed.css)
          add_test(NAME Lexing_static__Comment_inside_[_..._]_lacks_starting_*
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_static badcomment.css)
          add_test(NAME Lexing_static__Various_@font-face_rules
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND lex_static fontface.css)
        endif(CSS_RUN_DISABLED_TESTS)
    
        add_executable(lex-auto_static ${CMAKE_SOURCE_DIR}/test/lex-auto.c)
        target_link_libraries(lex-auto_static libcss_static)
        add_test(NAME Automated_lexer_tests_static__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/lex
          COMMAND lex-auto_static tests1.dat)
        add_test(NAME Automated_lexer_tests_static__More_complicated_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/lex
          COMMAND lex-auto_static tests2.dat)
        add_test(NAME Automated_lexer_tests_static__Regression_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/lex
          COMMAND lex-auto_static regression.dat)
    
        add_executable(number_static ${CMAKE_SOURCE_DIR}/test/number.c)
        target_link_libraries(number_static libcss_static)
        add_test(NAME Conversion_of_numbers_to_fixed_point_static__Number_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/number
          COMMAND number_static number.dat)
    
        if(CSS_DISABLED_TESTS)
          add_executable(parse_static ${CMAKE_SOURCE_DIR}/test/parse.c)
          target_link_libraries(parse_static libcss_static)
          add_test(NAME Parsing_[core_syntax]_static__Reasonably_simple_CSS_file_[semantically_invalid] 
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_static simple.css)
          add_test(NAME Parsing_[core_syntax]_static__All_CSS_Zen_Garden_stylesheets_concatenated
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_static allzengarden.css)
          add_test(NAME Parsing_[core_syntax]_static__Basic_blocks_and_at-rule_syntax
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_static blocks.css)
          add_test(NAME Parsing_[core_syntax]_static__Malformed_declarations_from_the_CSS_2.1_spec
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_static malformed.css)
          add_test(NAME Parsing_[core_syntax]_static__Comment_inside_[_..._]_lacks_starting_*
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_static badcomment.css)
          add_test(NAME Parsing_[core_syntax]_static__Various_@font-face_rules
            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/css
            COMMAND parse_static fontface.css)
        endif(CSS_DISABLED_TESTS)
    
        add_executable(parse-auto_static ${CMAKE_SOURCE_DIR}/test/parse-auto.c)
        target_link_libraries(parse-auto_static libcss_static)
        add_test(NAME  Automated_parser_tests_[bytecode]_static__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_static tests1.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_static__Selectors
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_static selectors.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_static__@-rules
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_static atrules.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_static__Colour_values
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_static colours.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_static__HSL_Colour_values
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_static colours-hsl.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_static__:nth-*_expressions
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_static nth.dat)
        add_test(NAME  Automated_parser_tests_[bytecode]_static__Properties
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse
          COMMAND parse-auto_static properties.dat)
    
        add_executable(parse2-auto_static ${CMAKE_SOURCE_DIR}/test/parse2-auto.c)
        target_link_libraries(parse2-auto_static libcss_static)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static tests1.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Unexpected_EOF_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static eof.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Comment_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static comments.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Invalid_selector_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static selectors.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Illegal_value_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static illegal-values.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Malformed_declaration_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static malformed-declarations.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Unknown_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static unknown-properties.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Illegal_background-position_values
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static bgpos.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Aural_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static au.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Background_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static bg.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Border_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static border.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Font_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static font.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__List_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static list.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Margin_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static margin.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Outline_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static outline.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Overflow_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static overflow.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Padding_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static padding.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Multi-column_layout_property_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static multicol.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Flexbox_properties_and_shorthands_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static flexbox.dat)
        add_test(NAME Automated_parser_tests_[om_&_invalid]_static__Length_unit_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/parse2
          COMMAND parse2-auto_static units.dat)
    
        add_executable(select_static ${CMAKE_SOURCE_DIR}/test/select.c)
        target_link_libraries(select_static libcss_static)
        add_test(NAME Automated_selection_engine_tests_static__Basic_tests
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test/data/select
          COMMAND select_static tests1.dat)
    
      endif(BUILD_STATIC_LIBS)
    endif(BUILD_TESTING)
    
    txt file icon CMakeLists.txt (43,284 bytes) 2018-09-29 21:41 +

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2018-09-29 21:41 J. Peter Mugaas New Issue
2018-09-29 21:41 J. Peter Mugaas File Added: CMakeLists.txt
2018-10-23 19:41 Vincent Sanders Status new => acknowledged
+Issue History