[cmake-commits] hoffman committed CMakeLists.txt 1.1 1.2 bar.cxx 1.1 1.2 foo.cxx 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Tue May 8 11:53:41 EDT 2007


Update of /cvsroot/CMake/CMake/Tests/Framework
In directory public:/mounts/ram/cvs-serv29860/Tests/Framework

Modified Files:
	CMakeLists.txt bar.cxx foo.cxx 
Log Message:
ENH: fix it so that the FRAMEWORK property does not break the building of normal shared libs on non-mac platforms


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Framework/CMakeLists.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CMakeLists.txt	8 May 2007 14:58:35 -0000	1.1
+++ CMakeLists.txt	8 May 2007 15:53:39 -0000	1.2
@@ -1,11 +1,11 @@
 project(Framework)
 add_library(foo SHARED foo.cxx)
 set_target_properties(foo PROPERTIES 
-                          FRAMEWORK TRUE
-                          FRAMEWORK_PUBLIC_HEADERS "foo.h;foo2.h"
-                          FRAMEWORK_VERSION ver2
-                          FRAMEWORK_RESOURCES ""
-#                          VERSION 1.2
+  FRAMEWORK TRUE
+  FRAMEWORK_PUBLIC_HEADERS "foo.h;foo2.h"
+  FRAMEWORK_VERSION ver2
+  FRAMEWORK_RESOURCES ""
 )
 add_executable(bar bar.cxx)
 target_link_libraries(bar foo)
+ 

Index: bar.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Framework/bar.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bar.cxx	8 May 2007 14:58:35 -0000	1.1
+++ bar.cxx	8 May 2007 15:53:39 -0000	1.2
@@ -1,4 +1,7 @@
-void foo();
+#ifdef _WIN32
+#  define CM_TEST_LIB_IMPORT  __declspec( dllimport )
+#endif
+CM_TEST_LIB_IMPORT void foo();
 int main()
 {
   foo();

Index: foo.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Framework/foo.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- foo.cxx	8 May 2007 14:58:35 -0000	1.1
+++ foo.cxx	8 May 2007 15:53:39 -0000	1.2
@@ -1,6 +1,8 @@
 #include <stdio.h>
-
-void foo()
+#ifdef _WIN32
+#  define CM_TEST_LIB_EXPORT  __declspec( dllexport )
+#endif
+CM_TEST_LIB_EXPORT void foo()
 {
   printf("foo\n");
 }



More information about the Cmake-commits mailing list