---------- Forwarded message ----------
From: John Drescher <dresche...@gmail.com>
Date: Thu, Jan 19, 2012 at 1:00 AM
Subject: Re: [CMake] building libs and specifying addition folders
To: Dev Guy <devguy...@gmail.com>


On Wed, Jan 18, 2012 at 10:57 PM, Dev Guy <devguy...@gmail.com> wrote:
> Hi,
>
> I am relatively new to CMake and I've read the tutorial. However I
> have a few questions.
>
> 1. How can I declare a CMakeLists file to create a project to build a
> DLL or static lib ? I assume if I build a DLL on windows, it will
> build as a shared lib on Linux

put SHARED in the add_library statement

For more info than that type the following from a command prompt or shell:

cmake --help-command add_library

>
> 2. If my main source folder has 2 sub-folders, one that only includes
> header files call is Include and another folder that contains source
> files call it Utils. How do I add declare them to my CMakeLists files
> so that both the header and addition source files are found and and
> compiled in the main source folder to build the final binary.
>

add_subdirectory

Again for help:
cmake --help-command add_subdirectory


John


-- 
John M. Drescher
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to