summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-22 14:33:11 +0000
committerCampbell Barton <ideasman42@gmail.com>2011-06-22 14:33:11 +0000
commitfd70df8246aa298587c90fa5d451c25abe858045 (patch)
tree69c7b7db207ea86689cf2efe03046ed48a555d1e /CMakeScripts
parentReplace deprecated GtkCombo (diff)
downloadinkscape-fd70df8246aa298587c90fa5d451c25abe858045.tar.gz
inkscape-fd70df8246aa298587c90fa5d451c25abe858045.zip
get cmake working again.
(bzr r10334)
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake6
-rwxr-xr-xCMakeScripts/cmake_consistency_check.py31
2 files changed, 35 insertions, 2 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 591de1327..d0fcaa6da 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -85,6 +85,12 @@ list(APPEND INKSCAPE_LIBS
)
+## XXX, we need a way to get this properly
+# pkg-config gtkmm-2.4 --cflags-only-I
+list(APPEND INKSCAPE_INCS
+ "/usr/lib/cairomm-1.0/include"
+)
+
find_package(Freetype REQUIRED)
list(APPEND INKSCAPE_INCS ${FREETYPE_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES})
diff --git a/CMakeScripts/cmake_consistency_check.py b/CMakeScripts/cmake_consistency_check.py
index f308a2f8b..65224d404 100755
--- a/CMakeScripts/cmake_consistency_check.py
+++ b/CMakeScripts/cmake_consistency_check.py
@@ -95,6 +95,7 @@ print("Scanning:", base)
global_h = set()
global_c = set()
+global_refs = {}
def source_list(path, filename_check=None):
@@ -197,8 +198,10 @@ def cmake_get_src(f):
if is_c_header(new_file):
sources_h.append(new_file)
+ global_refs.setdefault(new_file, []).append((f, i))
elif is_c(new_file):
sources_c.append(new_file)
+ global_refs.setdefault(new_file, []).append((f, i))
elif l in ("PARENT_SCOPE", ):
# cmake var, ignore
pass
@@ -240,13 +243,37 @@ def is_ignore(f):
return True
return False
+
# First do stupid check, do these files exist?
+print("\nChecking for missing references:")
+import sys
+is_err = False
+errs = []
for f in (global_h | global_c):
if f.endswith("dna.c"):
continue
if not os.path.exists(f):
- raise Exception("CMake referenced file missing: " + f)
+ refs = global_refs[f]
+ if refs:
+ for cf, i in refs:
+ errs.append((cf, i))
+ else:
+ raise Exception("CMake referenecs missing, internal error, aborting!")
+ is_err = True
+
+errs.sort()
+errs.reverse()
+for cf, i in errs:
+ print("%s:%d" % (cf, i))
+ # Write a 'sed' script, useful if we get a lot of these
+ # print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
+
+
+if is_err:
+ raise Exception("CMake referenecs missing files, aborting!")
+del is_err
+del errs
# now check on files not accounted for.
print("\nC/C++ Files CMake doesnt know about...")
@@ -254,7 +281,7 @@ for cf in sorted(source_list(base, is_c)):
if not is_ignore(cf):
if cf not in global_c:
print("missing_c: ", cf)
-
+
# check if automake builds a corrasponding .o file.
'''
if cf in global_c: