From: Tim Kientzle Date: Mon, 10 Aug 2009 03:34:27 +0000 (-0400) Subject: Use LOCATION property to locate executable for testing purposes. It seems to actuall... X-Git-Tag: v2.8.0~435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9872d95182215dff4a1bd217bb683441e7f01422;p=thirdparty%2Flibarchive.git Use LOCATION property to locate executable for testing purposes. It seems to actually work. SVN-Revision: 1353 --- diff --git a/cpio/CMakeLists.txt b/cpio/CMakeLists.txt index 57ac31786..4780dc187 100644 --- a/cpio/CMakeLists.txt +++ b/cpio/CMakeLists.txt @@ -36,13 +36,14 @@ IF(ENABLE_CPIO) ELSE(ENABLE_CPIO_SHARED) TARGET_LINK_LIBRARIES(bsdcpio archive_static ${ADDITIONAL_LIBS}) ENDIF(ENABLE_CPIO_SHARED) + # On Windows, DLL must end up in same dir with EXEs, so put them all + # in the top-level build dir. IF(WIN32 AND NOT CYGWIN) SET_TARGET_PROPERTIES(bsdcpio PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) - SET(BSDCPIO ${CMAKE_BINARY_DIR}/debug/bsdcpio.exe) - ELSE(WIN32 AND NOT CYGWIN) - SET(BSDCPIO ${CMAKE_CURRENT_BINARY_DIR}/bsdcpio) ENDIF(WIN32 AND NOT CYGWIN) + # Full path to the compiled executable + GET_TARGET_PROPERTY(BSDCPIO bsdcpio LOCATION) # INSTALL(TARGETS bsdcpio RUNTIME DESTINATION bin) INSTALL_MAN(${bsdcpio_MANS})