[sword-svn] r2574 - in trunk: tests utilities

greg.hellings at crosswire.org greg.hellings at crosswire.org
Wed Oct 20 05:04:33 MST 2010


Author: greg.hellings
Date: 2010-10-20 05:04:33 -0700 (Wed, 20 Oct 2010)
New Revision: 2574

Modified:
   trunk/tests/CMakeLists.txt
   trunk/utilities/CMakeLists.txt
Log:
Merging CMake changes regarding shared/static library support together.


Modified: trunk/tests/CMakeLists.txt
===================================================================
--- trunk/tests/CMakeLists.txt	2010-10-17 21:15:48 UTC (rev 2573)
+++ trunk/tests/CMakeLists.txt	2010-10-20 12:04:33 UTC (rev 2574)
@@ -61,7 +61,11 @@
 
 FOREACH(TEST ${test_PROGRAMS})
 	ADD_EXECUTABLE(${TEST} EXCLUDE_FROM_ALL	${TEST}.cpp)
-	TARGET_LINK_LIBRARIES(${TEST}	sword)
+	IF(BUILDING_SHARED)
+		TARGET_LINK_LIBRARIES(${TEST}	sword)
+	ELSE(BUILDING_SHARED)
+		TARGET_LINK_LIBRARIES(${TEST} sword_static)
+	ENDIF(BUILDING_SHARED)
 ENDFOREACH(TEST ${test_PROGRAMS})
 
 ########################################################################################

Modified: trunk/utilities/CMakeLists.txt
===================================================================
--- trunk/utilities/CMakeLists.txt	2010-10-17 21:15:48 UTC (rev 2573)
+++ trunk/utilities/CMakeLists.txt	2010-10-20 12:04:33 UTC (rev 2574)
@@ -57,7 +57,11 @@
 
 FOREACH(UTIL ${install_UTILITIES} ${noinstall_UTILITIES})
 	ADD_EXECUTABLE("${UTIL}"	"${UTIL}.cpp")
-	TARGET_LINK_LIBRARIES("${UTIL}" sword)
+	IF(BUILDING_SHARED)
+		TARGET_LINK_LIBRARIES("${UTIL}" sword)
+	ELSE(BUILDING_SHARED)
+		TARGET_LINK_LIBRARIES("${UTIL}" sword_static)
+	ENDIF(BUILDING_SHARED)
 ENDFOREACH(UTIL ${install_UTILITIES})
 
 ####################################################################
@@ -66,7 +70,11 @@
 # 
 
 ADD_EXECUTABLE(lexdump	lexdump.c)
-TARGET_LINK_LIBRARIES(lexdump sword)
+IF(BUILDING_SHARED)
+	TARGET_LINK_LIBRARIES(lexdump sword)
+ELSE(BUILDING_SHARED)
+	TARGET_LINK_LIBRARIES(lexdump sword_static)
+ENDIF(BUILDING_SHARED)
 
 ####################################################################
 # Install the utilities




More information about the sword-cvs mailing list