mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-07 06:04:59 +00:00
CMakeLists.txt: Align binary locations with Autotools
Target "xmlwf" even collided with the source folder of the same name, previously: $ cmake . && make ... [ 82%] Linking C executable xmlwf .../ld: cannot open output file xmlwf: Is a directory collect2: error: ld returned 1 exit status ...
This commit is contained in:
parent
f2b1209477
commit
0ab8564db6
1 changed files with 7 additions and 2 deletions
|
@ -86,6 +86,7 @@ if(BUILD_tools AND NOT WINCE)
|
|||
)
|
||||
|
||||
add_executable(xmlwf ${xmlwf_SRCS})
|
||||
set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)
|
||||
target_link_libraries(xmlwf expat)
|
||||
install(TARGETS xmlwf DESTINATION bin)
|
||||
install(FILES doc/xmlwf.1 DESTINATION share/man/man1)
|
||||
|
@ -93,19 +94,23 @@ endif(BUILD_tools AND NOT WINCE)
|
|||
|
||||
if(BUILD_examples)
|
||||
add_executable(elements examples/elements.c)
|
||||
set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
|
||||
target_link_libraries(elements expat)
|
||||
|
||||
add_executable(outline examples/outline.c)
|
||||
set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
|
||||
target_link_libraries(outline expat)
|
||||
endif(BUILD_examples)
|
||||
|
||||
if(BUILD_tests)
|
||||
## these are unittests that can be run on any platform
|
||||
add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c)
|
||||
set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
|
||||
target_link_libraries(runtests expat)
|
||||
add_test(runtests runtests)
|
||||
add_test(runtests tests/runtests)
|
||||
|
||||
add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c)
|
||||
set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
|
||||
target_link_libraries(runtestspp expat)
|
||||
add_test(runtestspp runtestspp)
|
||||
add_test(runtestspp tests/runtestspp)
|
||||
endif(BUILD_tests)
|
||||
|
|
Loading…
Add table
Reference in a new issue