CMake error while configuring “install TARGETS given no RUNTIME DESTINATION for executable target ”assimp_simpletexturedogl“.”

Dario_IV

You forgot to indicate a folder for the executable. Try this:

INSTALL( 

     TARGETS assimp_simpletexturedogl
     RUNTIME DESTINATION bin
     DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
) 

I don't know why in cMake is a requirement to have a drop folder ( bin in my example ) for the executable, but this is the problem here.

I ran into this tonight and after a crash course in cmake I tried cmake --trace-expand which showed a bunch of variables were blank, including ${ASSIMP_BIN_INSTALL_DIR}.

At which point I just loaded the .sln file with vs2015 community, let it upgrade it, and then set the needed things by hand.

Building assimp 3.2 from sources was necessary and cmake worked fine for this. I also chose to edit the output file names to exclude the -mtd-130, i.e. set them to inherit from project defaults.

It works for me, hope that helps somebody until the sample cmakelist files are updated.

I got this to work simply by doing the following:

mkdir build
cd build
cmake .. -DASSIMP_BIN_INSTALL_DIR=`pwd`

For example:

install(TARGETS snappy
        EXPORT SnappyTargets
        # RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # DESTINATION error
        RUNTIME DESTINATION bin ${CMAKE_INSTALL_BINDIR} # should add bin or other dir
        LIBRARY DESTINATION lib ${CMAKE_INSTALL_LIBDIR}
        # ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR # DESTINATION error
        ARCHIVE DESTINATION lib ${CMAKE_INSTALL_LIBDIR} # should add lib
)

Related to this question