Hey everyone, I am using CMake 2.8.12.2 to create a Visual Studio 12 (2013) project that builds a library (C++). In my CMake file (an example project for simplicity), I have: PROJECT (testcmake) set(CMAKE_BUILD_TYPE Debug) set(SRC src/testcmake.cpp ) include_directories( include/ )
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
ADD_LIBRARY(testcmake SHARED ${SRC})
The only thing I cannot get to work is the CMAKE_LIBRARY_OUTPUT_DIRECTORY
variable. No matter what I try (including other possible CMake variables), it
does not get translated to the "Output Directory" field in Visual Studio when
building a project. My library is always placed inside of
testcmake\build\Debug, when I want it in ${CMAKE_CURRENT_LIST_DIR}. I can
manually change the "Output Directory" inside Visual Studio and the library
outputs to the wanted location, but if I ever modify the CMakeLists file it
breaks again, so that is not a solution.
Note that I have no problems getting this to work on Linux with CMake/Make.
Thanks for the help!
Jim
smime.p7s
Description: S/MIME cryptographic signature
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
