summaryrefslogtreecommitdiff
path: root/tools/make_cmakelists.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/make_cmakelists.py')
-rwxr-xr-xtools/make_cmakelists.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/make_cmakelists.py b/tools/make_cmakelists.py
index 9a7eaf5..1fa1615 100755
--- a/tools/make_cmakelists.py
+++ b/tools/make_cmakelists.py
@@ -11,6 +11,7 @@ from __future__ import print_function
import sys
import textwrap
+import os
def StripColons(deps):
return map(lambda x: x[1:], deps)
@@ -38,12 +39,20 @@ class BuildFileFunctions(object):
if kwargs["name"] == "amalgamation" or kwargs["name"] == "upbc_generator":
return
files = kwargs.get("srcs", []) + kwargs.get("hdrs", [])
+ found_files = []
+ for file in files:
+ if os.path.isfile(file):
+ found_files.append(file)
+ elif os.path.isfile("generated/" + file):
+ found_files.append("generated/" + file)
+ else:
+ print("Warning: no such file: " + file)
if filter(IsSourceFile, files):
# Has sources, make this a normal library.
self.converter.toplevel += "add_library(%s\n %s)\n" % (
kwargs["name"],
- "\n ".join(files)
+ "\n ".join(found_files)
)
self._add_deps(kwargs)
else:
@@ -143,6 +152,9 @@ class BuildFileFunctions(object):
def licenses(self, *args):
pass
+ def filegroup(self, **kwargs):
+ pass
+
def map_dep(self, arg):
return arg
@@ -227,6 +239,7 @@ class Converter(object):
endif()
include_directories(.)
+ include_directories(generated)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(APPLE)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback