Revision: 77412
http://sourceforge.net/p/brlcad/code/77412
Author: starseeker
Date: 2020-10-13 17:38:26 +0000 (Tue, 13 Oct 2020)
Log Message:
-----------
Ah! Need to let the obj build target know that it too depends on any targets
in the lib list. Makes sense in retrospect - object target is a separate
target, and it doesn't automatically depend on what its 'parent' linking target
depended on.
Modified Paths:
--------------
brlcad/branches/thirdparty_rework/src/other/openNURBS/CMakeLists.txt
Modified: brlcad/branches/thirdparty_rework/src/other/openNURBS/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/openNURBS/CMakeLists.txt
2020-10-13 17:22:33 UTC (rev 77411)
+++ brlcad/branches/thirdparty_rework/src/other/openNURBS/CMakeLists.txt
2020-10-13 17:38:26 UTC (rev 77412)
@@ -350,6 +350,7 @@
# Based on the options, define libraries as either stand-alone builds
# or dependencies on OBJECT library builds
if(NOT USE_OBJECT_LIBS)
+
if(BUILD_SHARED_LIBS)
add_library(openNURBS SHARED ${OPENNURBS_SOURCES})
if(MSVC)
@@ -356,11 +357,23 @@
set_property(TARGET openNURBS APPEND PROPERTY COMPILE_DEFINITIONS
"ON_DLL_EXPORTS")
endif(MSVC)
endif(BUILD_SHARED_LIBS)
+
if(BUILD_STATIC_LIBS)
add_library(openNURBS-static STATIC ${OPENNURBS_SOURCES})
endif(BUILD_STATIC_LIBS)
+
else(NOT USE_OBJECT_LIBS)
+
add_library(openNURBS-obj OBJECT ${OPENNURBS_SOURCES})
+
+ # For build ordering, if we are linking to another build target make sure
+ # the object build depends on that target
+ foreach(DEP ${OPENNURBS_LINKLIBRARIES})
+ if(TARGET ${DEP})
+ add_dependencies(openNURBS-obj ${DEP})
+ endif(TARGET ${DEP})
+ endforeach(DEP ${OPENNURBS_LINKLIBRARIES})
+
if(BUILD_SHARED_LIBS)
add_library(openNURBS SHARED $<TARGET_OBJECTS:openNURBS-obj>)
if(MSVC)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits