mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Correct(?) syntax with target_compile_options() in top level CMakeLists.txt. Correct the logic flow in libncxml/CMakeLists.txt to not try to include non-existant directory when libxml2 is not found.
This commit is contained in:
parent
1e31577a2c
commit
44cb18169e
@ -132,7 +132,7 @@ include(GNUInstallDirs)
|
||||
|
||||
if(MSVC)
|
||||
set(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
target_compile_options(netcdf "/utf-8")
|
||||
target_compile_options(netcdf PUBLIC "/utf-8")
|
||||
endif()
|
||||
|
||||
# auto-configure style checks, other CMake modules.
|
||||
|
@ -5,14 +5,19 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
add_library(ncxml OBJECT ${libncxml_SOURCES})
|
||||
target_include_directories(ncxml
|
||||
PUBLIC
|
||||
./include
|
||||
PRIVATE
|
||||
${LIBXML2_INCLUDE_DIRS}
|
||||
IF(HAVE_LIBXML2)
|
||||
target_include_directories(ncxml
|
||||
PUBLIC
|
||||
./include
|
||||
PRIVATE
|
||||
${LIBXML2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
ELSE()
|
||||
target_include_directories(ncxml
|
||||
PUBLIC
|
||||
./include
|
||||
)
|
||||
ENDIF(HAVE_LIBXML2)
|
||||
|
||||
#IF(NOT MSVC)
|
||||
#target_compile_features(ncxml PUBLIC cxx_std_11)
|
||||
|
Loading…
Reference in New Issue
Block a user