<div dir="ltr"># You don't need the .in file.<div><br></div><div><div>CMAKE_MINIMUM_REQUIRED(VERSION 2.8)</div><div><br></div><div>PROJECT(hello)</div><div><br></div><div>set (hello_VERSION_MAJOR 1)</div><div>set (hello_VERSION_MINOR 1)</div>
<div><br></div><div>ENABLE_TESTING()</div><div><br></div><div>ADD_LIBRARY(hello hello.cpp)</div><div><br></div><div style># This works just the same. Unless I'm missing something.</div><div><div>SET(hello_INCLUDE_DIRS</div>
<div> ${CMAKE_INSTALL_PREFIX}/include/hello-${hello_VERSION_MAJOR}.${hello_VERSION_MINOR})</div><div>SET(hello_LIBRARIES</div><div> ${CMAKE_INSTALL_PREFIX}/lib/hello-${hello_VERSION_MAJOR}.${hello_VERSION_MINOR}/libhello.a)</div>
</div><div><br></div><div>INSTALL(TARGETS hello DESTINATION</div><div> lib/hello-${hello_VERSION_MAJOR}.${hello_VERSION_MINOR})</div><div><br></div><div>INSTALL(FILES helloConfig.cmake DESTINATION</div><div> lib/hello-${hello_VERSION_MAJOR}.${hello_VERSION_MINOR})</div>
<div><br></div><div>INSTALL(FILES hello.h DESTINATION</div><div> include/hello-${hello_VERSION_MAJOR}.${hello_VERSION_MINOR})</div></div></div>