Hello all,

I've been working on getting cmake set up in our dev environment for cross 
platform builds and am running into some (one, primarily) issues.

In general, our source tree looks like this:

project Folder A
  \
    code folder for (static lib) project A-1
    |
    code folder for (static lib) project A-2
    |
    code folder for (dynamic lib) project A-3
project Folder B
  \
    code folder for (static lib) project B-1
    |
    code folder for (static lib) project B-2
    |
    code folder for (static lib) project B-3
project Folder C
  \
    code folder for (dynamic lib) project C-1
    |
    code folder for (dynamic lib) project C-2
    |
    code folder for (static lib) project C-3

The problem - dependencies.  Each build is supposed to be independent of any 
other. Soooo:

Build Project A-1
  \
    Depends on B-1
      \
        Depends on C-3

Build Project A-2
  \
    Depends on B-3
      \
        Depends on C-3

Build Project A-3
  \
    Depends on A-1
  \
    Depends on A-2

I cannot figure out how to prevent CMP-0002 errors on target C-3 when trying to 
build A-3 (without first having to run a separate build of C-3 prior to running 
any of them).

Here is a snippet of how I am loading the C-3 library in B-1 and B-3:

find_library(PLATFORM_LIB Platform 
${CMAKE_BINARY_DIR}/../lib/$ENV{PLATFORM_NAME} )

if (NOT EXISTS ${PLATFORM_LIB})
        message(STATUS "Platform library does not exist.  Adding source build.")
        add_subdirectory( ${CMAKE_BINARY_DIR}/../source/n2ksdk/platform 
${CMAKE_BINARY_DIR}/../buildPlatform )
endif (NOT EXISTS ${PLATFORM_LIB})

Any help or guidance would be appreciated.

Regards,
Frank
_______________________________________________
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