Revision: 55717
          http://sourceforge.net/p/brlcad/code/55717
Author:   starseeker
Date:     2013-06-12 14:12:09 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
isst wasn't using the brlcad target macros for its library because it needed a 
custom install directory location.  Rather than ditch the macro setup (which 
does lots of nice things automatically) add the NO_INSTALL option already used 
for executables to the library macro as well.  This lets us pass the NO_INSTALL 
flag for the isst library to disable the automatic install call and we can 
instead substitute our own customized version.

Modified Paths:
--------------
    brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake
    brlcad/trunk/src/adrt/CMakeLists.txt

Modified: brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake
===================================================================
--- brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake        2013-06-12 07:16:14 UTC 
(rev 55716)
+++ brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake        2013-06-12 14:12:09 UTC 
(rev 55717)
@@ -162,8 +162,11 @@
   add_executable(${execname} ${srcslist})
   target_link_libraries(${execname} ${libslist})
 
-  # Make sure we don't have a non-installed exec target.  If it is to
-  # be installed, call the install function
+
+  # If an executable isn't to be installed or needs to be installed 
+  # somewhere other than the default location, the NO_INSTALL argument
+  # bypasses the standard install command call.  Otherwise, call install
+  # with standard arguments.
   CHECK_OPT("NO_INSTALL" NO_EXEC_INSTALL "${ARGN}")
   if(NOT NO_EXEC_INSTALL)
     install(TARGETS ${execname} DESTINATION ${BIN_DIR})
@@ -284,11 +287,17 @@
       target_link_libraries(${libname} ${libslist})
     endif(NOT "${libslist}" STREQUAL "" AND NOT "${libslist}" STREQUAL "NONE")
 
-    # Call install to setup the installation logic.
-    install(TARGETS ${libname}
-      RUNTIME DESTINATION ${BIN_DIR}
-      LIBRARY DESTINATION ${LIB_DIR}
-      ARCHIVE DESTINATION ${LIB_DIR})
+    # If a library isn't to be installed or needs to be installed 
+    # somewhere other than the default location, the NO_INSTALL argument
+    # bypasses the standard install command call. Otherwise, call install 
+    # with standard arguments.
+    CHECK_OPT("NO_INSTALL" NO_LIB_INSTALL "${ARGN}")
+    if(NOT NO_LIB_INSTALL)
+      install(TARGETS ${libname}
+       RUNTIME DESTINATION ${BIN_DIR}
+       LIBRARY DESTINATION ${LIB_DIR}
+       ARCHIVE DESTINATION ${LIB_DIR})
+    endif(NOT NO_LIB_INSTALL)
 
     # Apply the definitions.
     foreach(lib_define ${${libname}_DEFINES})
@@ -337,10 +346,17 @@
       set_target_properties(${libname}-static PROPERTIES OUTPUT_NAME 
"${libname}")
     endif(NOT MSVC)
 
-    install(TARGETS ${libname}-static
-      RUNTIME DESTINATION ${BIN_DIR}
-      LIBRARY DESTINATION ${LIB_DIR}
-      ARCHIVE DESTINATION ${LIB_DIR})
+    # If a library isn't to be installed or needs to be installed 
+    # somewhere other than the default location, the NO_INSTALL argument
+    # bypasses the standard install command call. Otherwise, call install 
+    # with standard arguments.
+    CHECK_OPT("NO_INSTALL" NO_LIB_INSTALL "${ARGN}")
+    if(NOT NO_LIB_INSTALL)
+      install(TARGETS ${libname}-static
+       RUNTIME DESTINATION ${BIN_DIR}
+       LIBRARY DESTINATION ${LIB_DIR}
+       ARCHIVE DESTINATION ${LIB_DIR})
+    endif(NOT NO_LIB_INSTALL)
 
     foreach(lib_define ${${libname}_DEFINES})
       set_property(TARGET ${libname}-static APPEND PROPERTY 
COMPILE_DEFINITIONS "${lib_define}")

Modified: brlcad/trunk/src/adrt/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/adrt/CMakeLists.txt        2013-06-12 07:16:14 UTC (rev 
55716)
+++ brlcad/trunk/src/adrt/CMakeLists.txt        2013-06-12 14:12:09 UTC (rev 
55717)
@@ -64,11 +64,10 @@
   )
 if(TOGL_LIBRARIES AND BRLCAD_ENABLE_OPENGL)
   add_definitions(-DTOGL_USE_EXTERNAL_CONFIG_H=1)
-  add_library(issttcltk isst_tcltk.c)
   if(WIN32)
-    target_link_libraries(issttcltk librender ${TCL_LIBRARIES} 
${TOGL_STUB_LIBRARIES} ${OPENGL_LIBRARIES} opengl32.lib)
+    BRLCAD_ADDLIB(issttcltk isst_tcltk.c 
"librender;${TCL_LIBRARIES};${TOGL_STUB_LIBRARIES};${OPENGL_LIBRARIES};opengl32.lib"
 NO_INSTALL)
   else(WIN32)
-    target_link_libraries(issttcltk librender ${TCL_LIBRARIES} 
${TOGL_LIBRARIES})
+    BRLCAD_ADDLIB(issttcltk isst_tcltk.c 
"librender;${TCL_LIBRARIES};${TOGL_LIBRARIES}" NO_INSTALL)
   endif(WIN32)
   install(TARGETS issttcltk
     RUNTIME DESTINATION ${BIN_DIR}/isst0.1

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


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to