Simple as CMakeLists.txt file for a 2 .cpp file project:
------------------ 8< ---------------------
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
PROJECT(my_app)
find_package(Boost 1.42.0 REQUIRED COMPONENTS system program_options signals
date_time filesystem regex thread)
include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIR})
ADD_EXECUTABLE(${PROJECT_NAME} main.cpp MainWindow.cpp)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}
${Boost_THREAD_LIBRARY}
${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_SIGNALS_LIBRARY}
${Boost_DATE_TIME_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_REGEX_LIBRARY}
${OPENSSL_LIBRARIES} ${wt} ${wtdbo} ${wtdbopostgres} ${wthttp}
)
------------------ 8< ---------------------
Something like that (if you're linking in wt and wtdbo and postgresql and
boost).
Check out the cmake gui's too like ccmake:
http://www.cmake.org/cmake/help/runningcmake.html
Kind Regards,
Matthew Sherborne
On Sat, Oct 1, 2011 at 7:31 AM, Jack <ostrof...@users.sourceforge.net>wrote:
> On 2011.09.30 16:17, Alec Taylor wrote:
> > Thanks, haven't gotten it to work yet though, tried with:
> >
> > 1. http://pastebin.com/ZvLqwjfW
> >
> > & when that didn't work
> >
> > 2. http://pastebin.com/t0ge3W8h
> >
> > and a combination of the two.
> >
> > All I need for my project (at this stage) are the Wt libraries (with
> > extJS) and the Boost libraries.
> >
> > Please tell me how I can get this generated.
> It might help if you say where or how it is failing.
>
> I'm on Linux, and have at least gotten a successful start with the
> following. Note, I have a src directory for the source, am using
> Apache with fcgi as web server, and wtdbo for mysql access, so you may
> want to change at least those details. I'm also NOT using boost, but
> the comment was I believe from an example app that did use it, so it
> may give hints for that.
>
> ----- CMake.txt in the root dir of the app
> cmake_minimum_required(VERSION 2.8)
>
> INCLUDE_DIRECTORIES(/usr/local/wt/include /usr/include/mysql)
>
> SUBDIRS(src)
>
> SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "/var/www/treesdb/htdocs/wttrees")
> -----
>
> -----CMakeList.txt in the src directory
> SET(wttree_libs wt wtfcgi wtdbo wtdbomysql)
>
> #IF (MULTI_THREADED)
> # SET(tutorial_libs ${tutorial_libs} ${BOOST_THREAD_LIB})
> #ENDIF (MULTI_THREADED)
>
> ADD_EXECUTABLE(wttrees.wt
> wttrees.C
> traitsUI.C
> traitsDB.C
> )
>
> TARGET_LINK_LIBRARIES(wttrees.wt ${wttree_libs} )
>
> # INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
> # INCLUDE_DIRECTORIES(/usr/local/wt/include /usr/include/mysql)
> -----
>
>
> Jack
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest