On Sunday 24 February 2013, J Decker wrote: > On Sun, Feb 24, 2013 at 2:23 AM, Ansis Māliņš <[email protected]>wrote: > > # You don't need the .in file. > > > > CMAKE_MINIMUM_REQUIRED(VERSION 2.8) > > > > PROJECT(hello) > > > > set (hello_VERSION_MAJOR 1) > > set (hello_VERSION_MINOR 1) > > > > ENABLE_TESTING() > > > > ADD_LIBRARY(hello hello.cpp) > > > > # This works just the same. Unless I'm missing something. > > SET(hello_INCLUDE_DIRS > > > > ${CMAKE_INSTALL_PREFIX}/include/hello-${hello_VERSION_MAJOR}.${hello_VERS > > ION_MINOR}) SET(hello_LIBRARIES > > > > ${CMAKE_INSTALL_PREFIX}/lib/hello-${hello_VERSION_MAJOR}.${hello_VERSION_ > > MINOR}/libhello.a) > > s/lib/${CMAKE_STATIC_LIBRARY_PREFIX}/ > s/.a/${CMAKE_STATIC_LIBRARY_SUFFIX}/ > > also available ${CMAKE_EXECUTABLE_SUFFIX} would be blank in your case, but > not always. > > ${CMAKE_SHARED_LIBRARY_PREFX} > ${CMAKE_SHARED_LIBRARY_SUFFX} > > PREFIX will be blank for windows platforms and SUFFIX appropriate .lib or > .dll (.a, .so )
Please use the target-export feature, this handles all that for you, including dependent libraries, debug and optimized versions, etc. http://www.cmake.org/Wiki/CMake/Tutorials/Exporting_and_Importing_Targets Alex -- 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
