I am trying to run cmake to create makefiles. In a minimal working example, I have three files and 1 build directory.
File 1 is CMakeLists.txt containing exactly:
add_library (MathFunctions SHARED mysqrt.cxx) install (TARGETS MathFunctions LIBRARY DESTINATION lib)
File 2 is MathFunctions.h containing the prototype of the function; the function refers to mysqrt.cxx.
File 3 is mysqrt.cxx containing the include statement and function definition.
When I create a subdirectory of the assembly and run "cmake ..", I get
CMake Error at CMakeLists.txt:2 (install): install Library TARGETS given no DESTINATION!
Isn't that my add_library, but the correct grammar setting? If I delete both SHARED and LIBRARY, cmake builds without errors.
Thank you for your help.
source share