From b2aeba2b108911889823ad34dcfaae5f196a3a0d Mon Sep 17 00:00:00 2001 From: klickverbot Date: Wed, 3 Mar 2010 22:55:54 +0000 Subject: [PATCH] Fixed out-of-source builds of assimp_cmd. Removed sample comments from the assimp_cmd CMake script and adapted it to the style used in the other CMake files. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@580 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- tools/assimp_cmd/CMakeLists.txt | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tools/assimp_cmd/CMakeLists.txt b/tools/assimp_cmd/CMakeLists.txt index ba42a3373..72d8172a2 100644 --- a/tools/assimp_cmd/CMakeLists.txt +++ b/tools/assimp_cmd/CMakeLists.txt @@ -1,15 +1,11 @@ -# Make sure the compiler can find include files from our Hello library. -include_directories ( +INCLUDE_DIRECTORIES( ${Assimp_SOURCE_DIR}/include ${Assimp_SOURCE_DIR}/code ) -# Make sure the linker can find the Hello library once it is built. -link_directories (${Assimp_BINARY_DIR} ${AssetImporter_BINARY_DIR}/lib) +LINK_DIRECTORIES( ${Assimp_BINARY_DIR} ${Assimp_BINARY_DIR}/lib ) -# Add executable called "helloDemo" that is built from the source files -# "demo.cxx" and "demo_b.cxx". The extensions are automatically found. -add_executable( assimp_cmd +ADD_EXECUTABLE( assimp_cmd ../../contrib/zlib/adler32.c ../../contrib/zlib/compress.c ../../contrib/zlib/crc32.c @@ -39,11 +35,11 @@ add_executable( assimp_cmd WriteDumb.cpp ) +TARGET_LINK_LIBRARIES( assimp_cmd assimp ) +SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES + OUTPUT_NAME assimp +) -# Link the executable to the assimp library and rename it to assimp as well :-) -target_link_libraries ( assimp_cmd assimp ) -INSTALL(PROGRAMS ../../bin/assimp_cmd +INSTALL( TARGETS assimp_cmd DESTINATION "${BIN_INSTALL_DIR}" - RENAME assimp ) -