I am trying to include the header files of an external package in my library. Before VS19 + geant4.11 it was simply adding
include_directories(${PCRE_INCLUDE_DIR})
in the CMakeLists.txt of my new library
But this does not seem to work anymore: I tried target_include_directories (and many other things…) but it does not work because I am just building a library not a target. I am copying here my CMakeLists.txt.
Thanks
add_definitions(-DG4ICOMS_ALLOC_EXPORT)
add_definitions(-D_WIN32)
include_directories( ${PCRE_INCLUDE_DIR} )
(I checked PCRE_INCLUDE_DIR is properly defined)
geant4_global_library_target(NAME MyNewLibrary COMPONENTS sources.cmake)