[CMake] IMPORTED_LOCATION
Micha Renner
Micha.Renner at t-online.de
Mon Dec 1 06:04:07 EST 2008
Hello,
I have two questions for the listening below.
1. Out-commenting the line #4
results in a linker error LINK : fatal error LNK1104: File
"_sLib-NOTFOUND.obj" can't be opened"
What is the purpose of this command (line #4)?
2. If line #4 is active. An inspection of the project properties (link
-> command line) shows in the implib-section the following result:
/IMPLIB:"C:\WORK-C\ArchiveCMake\CMakeListsNeu\BuildDLL-2\TestDLL\CMake
\Debug\TestDll2.lib" /ERRORREPORT:PROMPT kernel32.lib user32.lib
gdi32.lib winspool.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
\WORK-C\ArchiveCMake\CMakeListsNeu\BuildDLL-2\DLL\CMake\Debug\SLib.lib
For what reason is there a TestDll2.lib?
Michael
Start of listening ----------------------------------------------------
1:PROJECT(TestDLL)
2:CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3:ADD_LIBRARY(_sLib SHARED IMPORTED)
4:SET_PROPERTY(TARGET _sLib PROPERTY IMPORTED_LOCATION /Path/SLib.dll)
5:SET_PROPERTY(TARGET _sLib PROPERTY IMPORTED_IMPLIB /Path/SLib.lib)
6:INCLUDE_DIRECTORIES(/myIncludeDir)
7:SET(_src MRTestC.c)
8:ADD_EXECUTABLE(TestDll2 ${_src})
9:TARGET_LINK_LIBRARIES(TestDll2 _sLib)
More information about the CMake
mailing list