Tyler Roscoe wrote:
On Wed, May 06, 2009 at 03:53:10PM -0400, Scott Gray wrote:
My problem is that I need to both generate the DLL and declare it as an
imported library so that other programs can depend upon it.  I think I'm

Maybe I'm missing something, but why do you need to do this? If you are
building the library yourself, why would you need to mark it as
"imported"?

You are right, I don't need to import it. My feeble brain was thinking that this would be a good way in which programs that would depend upon the generated library, thus they could just to:

    add_executable(some_prog some_prog.c)
    target_link_libraries(some_prog mylib_intl)

and cmake would just "know" where mylib_intl is located based upon the process that was used to generated it.

However, upon your suggestion I got rid of the IMPORT of the library and just did:

   link_directories("${LIBRARY_OUTPUT_PATH"})
   add_executable(some_prog some_prog.c)
   target_link_libraries(some_prog mylib_intl)

And it works.


make[2]: *** No rule to make target
`src/util/build/dist/lib/libmylib_intl.so', needed by `src/util/test/myprog'

I think all you need is to create a target with add_custom_target() that
drives the custom_command(), and then add_dependencies(your_library
translation_library_target).

Again, you are right. I followed your advice and everything seems to be working OK now. Now for the real test, I need to see if I can compile my stuff on Windows (ugh). We'll see how that goes :)

Thanks!
-scott

_______________________________________________
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