Re: [CMake] Put bin|lib folders under Debug|Release folders
On 05/08/2011 07:35 AM, Bo Zhou wrote: * Hello all,* * * * I am dealing with a problem about the output path. At present I just do* * like this,* * * * set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)* * set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib)* * * * And in fact the full path will be* * ${CMAKE_INSTALL_PREFIX}/bin/{Debug|Release}/, the all .exe .dll .pdb* * files will be generated there.* * * * Now I have a DLL target which should be in bin/plugins, I try a way* * which generates {Debug|Release} folders under the bin folder, that's* * unnecessary.* * * * I prefer a more clear output directory structure like* * ${CMAKE_INSTALL_PREFIX}/{Debug|Release}/bin/plugin, how should I do ?* * * * Thanks !* You shouldn't use the CMAKE_*_OUTPUT_DIRECTORY variables to write your project's binaries to their final installation directory under CMAKE_INSTALL_PREFIX. Instead, provide appropriate INSTALL() commands for each target and make use of INSTALL()'s CONFIGURATIONS clause, e.g. INSTALL(TARGETS plugin RUNTIME DESTINATION Debug/bin/plugin LIBRARY DESTINATION Debug/lib/plugin CONFIGURATIONS Debug) INSTALL(TARGETS plugin RUNTIME DESTINATION Release/bin/plugin LIBRARY DESTINATION Release/lib/plugin CONFIGURATIONS Release) etc. for further configurations and other targets to be installed. Regards, Michael Hello, doing this for me only writes the target “plugin” for one config cmake_config.cmake. Then one need to rebuild cmake_config each time. I’m using CMake 2.8.7 under Windows and Visual studio. Is it a known issue? Any idea about a fix? Regards, Erwan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Put bin|lib folders under Debug|Release folders
On 05/08/2011 07:35 AM, Bo Zhou wrote: Hello all, I am dealing with a problem about the output path. At present I just do like this, set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib) And in fact the full path will be ${CMAKE_INSTALL_PREFIX}/bin/{Debug|Release}/, the all .exe .dll .pdb files will be generated there. Now I have a DLL target which should be in bin/plugins, I try a way which generates {Debug|Release} folders under the bin folder, that's unnecessary. I prefer a more clear output directory structure like ${CMAKE_INSTALL_PREFIX}/{Debug|Release}/bin/plugin, how should I do ? Thanks ! You shouldn't use the CMAKE_*_OUTPUT_DIRECTORY variables to write your project's binaries to their final installation directory under CMAKE_INSTALL_PREFIX. Instead, provide appropriate INSTALL() commands for each target and make use of INSTALL()'s CONFIGURATIONS clause, e.g. INSTALL(TARGETS plugin RUNTIME DESTINATION Debug/bin/plugin LIBRARY DESTINATION Debug/lib/plugin CONFIGURATIONS Debug) INSTALL(TARGETS plugin RUNTIME DESTINATION Release/bin/plugin LIBRARY DESTINATION Release/lib/plugin CONFIGURATIONS Release) etc. for further configurations and other targets to be installed. Regards, Michael ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Put bin|lib folders under Debug|Release folders
Hello all, I am dealing with a problem about the output path. At present I just do like this, set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib) And in fact the full path will be ${CMAKE_INSTALL_PREFIX}/bin/{Debug|Release}/, the all .exe .dll .pdb files will be generated there. Now I have a DLL target which should be in bin/plugins, I try a way which generates {Debug|Release} folders under the bin folder, that's unnecessary. I prefer a more clear output directory structure like ${CMAKE_INSTALL_PREFIX}/{Debug|Release}/bin/plugin, how should I do ? Thanks ! -- BR, BZ attachment: Bo_Schwarzstein.vcf___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake