target_link_libraries adds libraries to the end of compilation commands. This fixes linking time errors.
amdctl.c:(.text+0xc37): undefined reference to `pow'
Also, I updated the minimum required version of cmake because of warning:
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
target_link_libraries
adds libraries to the end of compilation commands. This fixes linking time errors.Also, I updated the minimum required version of cmake because of warning: