I am just starting with cmake and trying to create a fairly simple project. Although the project itself is simple, it links to several static libraries that cmake did not create. They may be, I suppose, these are my libraries, but I still need to figure out how to connect third-party libraries.
Here is what I still have ...
cmake_minimum_required(VERSION 2.8.1)
cmake_policy(VERSION 2.8.1)
project( test01 )
include_directories("../../cpplib/sh_core" "../../cpplib/sh_core2" "../../cpplib/sh_genlib")
link_directories("../../cpplib/_vc_debug")
add_library( sh_core STATIC IMPORTED )
add_library( sh_core2 STATIC IMPORTED )
add_library( sh_genlib STATIC IMPORTED )
add_executable( test01 test01 test01_ast test01_parse test01_scan test01_main )
target_link_libraries(test01 sh_core sh_core2 sh_genlib)
The problem is that the three libraries with which I am trying to establish the link are incorrectly referenced in the generated project file. They are listed as sh_core-NOTFOUND, sh_core2-NOTFOUNDand sh_genlib-NOTFOUND.
, link_directories , find_library. ... WTF!!! , , , ATM. , -, , , .
... cmake, ?
- , , ? . , "../../cpplib/_vc_release".