[CMake] Linking my lib to a static lib
Daniel Blankensteiner
db at trunet.dk
Mon Nov 3 08:05:48 EST 2008
Hi all
I have read most of the "Mastering Cmake" book and googled, but I couldn't
find an answer, so I hope someone here can help me.
I'm building a lib and want to include other static libs, so that it's all
in one file, but I currently have two problems.
1. The dependencies to the static libs are not included in my VS-solution
file.
2. When I build my lib I get no output (no static or shared lib is
created).
Here is what I got so far:
;-------------------------------------------------------------------------
project (mylib)
cmake_minimum_required(VERSION 2.6)
set (SRC_FILES
mylib/channel.hpp
mylib/net/IP.hpp
)
include_directories (mylib vendor/include)
add_library (mylib ${SRC_FILES})
target_link_libraries (mylib debug vendord.lib optimized vendormt.lib)
set_target_properties (mylib PROPERTIES VERSION 1.0 LINKER_LANGUAGE CXX)
;-------------------------------------------------------------------------
Best regards
db
More information about the CMake
mailing list