Revision: 42029
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42029&view=rev
Author:   starseeker
Date:     2011-01-07 21:30:59 +0000 (Fri, 07 Jan 2011)

Log Message:
-----------
We can't do a directory-wide add_definitions when we're building two libraries, 
so customize the logic.  May want to alter the DLL_DEFINE macro to be 
per-target, that would avoid this verbosity, but need to test that more 
thoroughly.

Modified Paths:
--------------
    brlcad/branches/cmake/src/adrt/CMakeLists.txt

Modified: brlcad/branches/cmake/src/adrt/CMakeLists.txt
===================================================================
--- brlcad/branches/cmake/src/adrt/CMakeLists.txt       2011-01-07 20:38:04 UTC 
(rev 42028)
+++ brlcad/branches/cmake/src/adrt/CMakeLists.txt       2011-01-07 21:30:59 UTC 
(rev 42029)
@@ -17,8 +17,26 @@
        libtie/tie_kdtree0.c
        libtie/tie_kdtree1.c
 )
-BRLCAD_ADDLIB(libtie "${LIBTIE_SRCS}" libbu)
 
+IF(BUILD_SHARED_LIBS)
+       add_library(libtie SHARED ${LIBTIE_SRCS})
+       target_link_libraries(libtie libbu)
+       INSTALL(TARGETS libtie DESTINATION ${BRLCAD_INSTALL_LIB_DIR})
+       SET_TARGET_PROPERTIES(libtie-static PROPERTIES COMPILE_FLAGS 
"-DTIE_EXPORT_DLL")
+ENDIF(BUILD_SHARED_LIBS)
+IF(BUILD_STATIC_LIBS AND NOT MSVC)
+       add_library(libtie-static STATIC ${LIBTIE_SRCS})
+       target_link_libraries(libtie-static libbu)
+       SET_TARGET_PROPERTIES(libtie-static PROPERTIES COMPILE_FLAGS 
"-DTIE_EXPORT_DLL")
+       IF(NOT WIN32)
+               SET_TARGET_PROPERTIES(libtie-static PROPERTIES OUTPUT_NAME 
"libtie")
+       ENDIF(NOT WIN32)
+       IF(WIN32)
+               SET_TARGET_PROPERTIES(libtie-static PROPERTIES PREFIX "lib")
+       ENDIF(WIN32)
+       INSTALL(TARGETS libtie-static DESTINATION ${BRLCAD_INSTALL_LIB_DIR})
+ENDIF(BUILD_STATIC_LIBS AND NOT MSVC)
+
 SET(LIBRENDER_SRCS
   load.c 
   load_g.c 
@@ -47,7 +65,24 @@
   librender/texture_perlin.c 
   librender/texture_stack.c
 )
-BRLCAD_ADDLIB(librender "${LIBRENDER_SRCS}" "libtie libgcv")
+IF(BUILD_SHARED_LIBS)
+       add_library(librender SHARED ${LIBRENDER_SRCS})
+       target_link_libraries(librender libtie libgcv)
+       INSTALL(TARGETS librender DESTINATION ${BRLCAD_INSTALL_LIB_DIR})
+       SET_TARGET_PROPERTIES(librender-static PROPERTIES COMPILE_FLAGS 
"-DRENDER_EXPORT_DLL")
+ENDIF(BUILD_SHARED_LIBS)
+IF(BUILD_STATIC_LIBS AND NOT MSVC)
+       add_library(librender-static STATIC ${LIBRENDER_SRCS})
+       target_link_libraries(librender-static libtie libgcv)
+       SET_TARGET_PROPERTIES(librender-static PROPERTIES COMPILE_FLAGS 
"-DRENDER_EXPORT_DLL")
+       IF(NOT WIN32)
+               SET_TARGET_PROPERTIES(librender-static PROPERTIES OUTPUT_NAME 
"librender")
+       ENDIF(NOT WIN32)
+       IF(WIN32)
+               SET_TARGET_PROPERTIES(librender-static PROPERTIES PREFIX "lib")
+       ENDIF(WIN32)
+       INSTALL(TARGETS librender-static DESTINATION ${BRLCAD_INSTALL_LIB_DIR})
+ENDIF(BUILD_STATIC_LIBS AND NOT MSVC)
 
 SET(tie_HDRS
        adrt.h  


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to