Overview
Features
Download
Documentation
Community
Add-Ons & Services

CMake driven SSL project

A general discussion forum.

CMake driven SSL project

Postby MaximKot » 16 Jan 2013, 17:06

Hello.
My poco version - 1.5.1, builded staticaly on ubuntu 12.04, via CMake 2.8.7
I have try to ad SSL functionality in my project, my config for find POCO looks so:
Code: Select all
#find Poco
find_library(POCO_FOUNDATION PocoFoundation PATHS ${CMAKE_LIBRARY_PATH})
find_library(POCO_NET PocoNet PATHS ${CMAKE_LIBRARY_PATH})
find_library(POCO_NET_SSL PocoNetSSL PATHS ${CMAKE_LIBRARY_PATH})
find_library(POCO_JSON PocoJSON PATHS ${CMAKE_LIBRARY_PATH})
find_library(POCO_Crypto PocoCrypto PATHS ${CMAKE_LIBRARY_PATH})
find_library(POCO_Util PocoUtil PATHS ${CMAKE_LIBRARY_PATH})
set(POCO_LIBS  ${POCO_Util} ${POCO_Crypto}  ${POCO_NET}  ${POCO_JSON} ${POCO_FOUNDATION} ${POCO_NET_SSL})
set(POCO_LIBS ${POCO_LIBS} CACHE STRING "POCO library set")

Because of i'm not need to use compleet poco, and need some crosscompilation staff with prebuilded libraries. All libraries are found. They are linked so :
Code: Select all
target_link_libraries( ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT} ${FUSE_LIBRARIES}  ${POCO_LIBS} )


But i have many(239 entries) undefined references like those:
Code: Select all
...
/home/maxim/projects/cldrive/3rdparty/poco/linux-x86_x64/libPocoNetSSL.a(SSLManager.cpp.o): In function `Poco::Net::SSLManager::appConfig()':
SSLManager.cpp:(.text+0xa08): undefined reference to `Poco::Util::Application::_pInstance'
SSLManager.cpp:(.text+0xa37): undefined reference to `Poco::Util::Application::_pInstance'
/home/maxim/projects/cldrive/3rdparty/poco/linux-x86_x64/libPocoNetSSL.a(SSLManager.cpp.o): In function `Poco::Net::SSLManager::initCertificateHandler(bool)':
SSLManager.cpp:(.text+0xb8e): undefined reference to `Poco::Util::AbstractConfiguration::getString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
SSLManager.cpp:(.text+0xc0a): undefined reference to `Poco::Util::UnknownOptionException::UnknownOptionException(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
SSLManager.cpp:(.text+0xc23): undefined reference to `Poco::Util::UnknownOptionException::~UnknownOptionException()'
SSLManager.cpp:(.text+0xc28): undefined reference to `typeinfo for Poco::Util::UnknownOptionException'
/home/maxim/projects/cldrive/3rdparty/poco/linux-x86_x64/libPocoNetSSL.a(SSLManager.cpp.o): In function `Poco::Net::SSLManager::initPassphraseHandler(bool)':
SSLManager.cpp:(.text+0x11fe): undefined reference to `Poco::Util::AbstractConfiguration::getString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
SSLManager.cpp:(.text+0x127a): undefined reference to `Poco::Util::UnknownOptionException::UnknownOptionException(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
....


Tell me please what i do wrong, or just give me download example project from standard distribution builded with own cmake config.
Regards, Maxim.
MaximKot
 
Posts: 2
Joined: 16 Jan 2013, 16:35

Re: CMake driven SSL project

Postby alex » 16 Jan 2013, 22:26

MaximKot wrote:give me download example project from standard distribution builded with own cmake config

CMake is NOT officially supported. See this discussion (the most recent one, there were many before) for the reason why - everyone wants it but nobody cares to own and maintain it.

Bottom line, if you want CMake, fix it and own it. Otherwise, use standard POCO build system, it's actually surprisingly simple:

Code: Select all
./configure && make
alex
 
Posts: 1086
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: CMake driven SSL project

Postby MaximKot » 17 Jan 2013, 13:21

Problem solved: my config was right, except one detail - there is in cmake order of linking libraries is important. First must be linked library which depends from other linked static libs.

P.S. For alex, idk what wrong with cmake config, at my mind point it more suitable and agile then autotools, and i had build poco for win, linux_x86_x64 and linux_arm without any problems at all. But my problem was in connect static libs to existing cmake project, so next time please read topic more attentively.
MaximKot
 
Posts: 2
Joined: 16 Jan 2013, 16:35

Re: CMake driven SSL project

Postby alex » 17 Jan 2013, 22:43

MaximKot wrote: so next time please read topic more attentively.

Perhaps you should heed your own advice and next time write your question more attentively:

MaximKot wrote:just give me download example project from standard distribution builded with own cmake config
alex
 
Posts: 1086
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron