Files
pcre2/maint/cmake-tests/build-interface/CMakeLists.txt
Nicholas Wilson e62c0e0916 Re-apply "Use standard CMake constructs to export the targets. (#260)" (#739)
Additionally, I have attempted to clean up some CMake issues to make the
package's build interface cleaner, in particular, avoiding polluting the
parent directory's include path with our config.h file (if PCRE2 is being
included as a subdirectory).

This re-adds changes from Theodore's commit:
    def175f4a9
and partially reverts changes from Carlo's commit:
    92d56a1f7c

---------

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
2025-04-08 17:37:19 +01:00

13 lines
386 B
CMake

cmake_minimum_required(VERSION 3.15)
project(TestBuildInterface C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED TRUE)
# To test the static vs dynamic interface, uncomment one of the following lines:
# set(BUILD_STATIC_LIBS OFF)
# set(BUILD_SHARED_LIBS ON)
add_subdirectory(pcre2)
add_executable(test_executable main.c)
target_link_libraries(test_executable PRIVATE pcre2-8)