Use INTERFACE to pass on unicode dependency
Linking the cxxopts library with the unicode libraries and specifying INTERFACE should ensure executables that link with cxxopts will also link with the unicode libraries.
This commit is contained in:
parent
9a2305e020
commit
b1795c27e4
@ -57,6 +57,11 @@ target_include_directories(
|
||||
cxxopts INTERFACE
|
||||
include/
|
||||
)
|
||||
target_link_libraries(
|
||||
cxxopts
|
||||
INTERFACE ${CXXOPTS_LINKER_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
if(CXXOPTS_BUILD_EXAMPLES)
|
||||
add_executable(example example.cpp)
|
||||
target_link_libraries(example cxxopts ${CXXOPTS_LINKER_LIBRARIES})
|
||||
target_link_libraries(example cxxopts)
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(example PUBLIC /W2)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
if (CXXOPTS_BUILD_TESTS)
|
||||
add_executable(options_test options.cpp)
|
||||
target_link_libraries(options_test cxxopts ${CXXOPTS_LINKER_LIBRARIES})
|
||||
target_link_libraries(options_test cxxopts)
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(options_test PUBLIC /W2)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user