Move CMake cord specification and cord executable to cord folder
authorIvan Maidanski <ivmai@mail.ru>
Wed, 5 Jun 2019 08:25:32 +0000 (11:25 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 5 Jun 2019 08:26:17 +0000 (11:26 +0300)
Issue #281 (bdwgc).

* CMakeLists.txt [WIN32]: Move add_executable, set_target_properties,
target_link_libraries for cord to cord/CMakeLists.txt.
* CMakeLists.txt (cord): Specify add_subdirectory.
* Makefile.am (EXTRA_DIST): Add cord/CMakeLists.txt.
* cord/CMakeLists.txt: New file.

CMakeLists.txt
Makefile.am
cord/CMakeLists.txt [new file with mode: 0644]

index 5fff6fe..8d386ca 100644 (file)
@@ -253,13 +253,6 @@ set_target_properties(gcmt-lib PROPERTIES
 
 add_library(gcmt-dll SHARED ${SRC})
 
-if (WIN32)
-  add_executable(cord cord/cordbscs.c cord/cordxtra.c
-                 cord/tests/de.c cord/tests/de_win.c)
-  set_target_properties(cord PROPERTIES WIN32_EXECUTABLE TRUE)
-  set_target_properties(cord PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL)
-  target_link_libraries(cord gc-lib)
-  target_link_libraries(cord gdi32)
-endif()
+add_subdirectory(cord)
 
 add_subdirectory(tests)
index bb6389f..5de2657 100644 (file)
@@ -199,7 +199,7 @@ EXTRA_DIST += README.QUICK
 EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE \
     OS2_MAKEFILE PCR-Makefile digimars.mak \
     Makefile.direct SMakefile.amiga WCC_MAKEFILE autogen.sh \
-    CMakeLists.txt tests/CMakeLists.txt
+    CMakeLists.txt cord/CMakeLists.txt tests/CMakeLists.txt
 
 # files used by makefiles other than Makefile.am
 #
diff --git a/cord/CMakeLists.txt b/cord/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1707737
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2000-2010 by Hewlett-Packard Company.  All rights reserved.
+##
+# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+##
+# Permission is hereby granted to use or copy this program
+# for any purpose,  provided the above notices are retained on all copies.
+# Permission to modify the code and to distribute modified code is granted,
+# provided the above notices are retained, and a notice that the code was
+# modified is included with the above copyright notice.
+##
+
+if (WIN32)
+  add_executable(cord cordbscs.c cordxtra.c
+                 tests/de.c tests/de_win.c)
+  set_target_properties(cord PROPERTIES WIN32_EXECUTABLE TRUE)
+  set_target_properties(cord PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL)
+  target_link_libraries(cord gc-lib)
+  target_link_libraries(cord gdi32)
+endif()