From: verbalshadow Date: Fri, 2 May 2008 06:03:19 +0000 (+0000) Subject: Cmake: More cleanup moved all known paths into ConfigPaths.cmake and temp Linking... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fb48f2d077b22740e62995c9fdb2cbd3251d153d;p=inkscape.git Cmake: More cleanup moved all known paths into ConfigPaths.cmake and temp Linking checking to help resolve linking issues --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c552147ef..5af631808 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,5 @@ PROJECT(inkscape CXX C) -MESSAGE(STATUS "Creating build files in: ${CMAKE_CURRENT_BINARY_DIR}") - SET(INKSCAPE_VERSION 0.46+devel) SET(PROJECT_NAME inkscape) SET(CMAKE_BACKWARDS_COMPATIBILITY 2.4) @@ -14,25 +12,12 @@ SET(CMAKE_INCLUDE_CURRENT_DIR TRUE) SET(CMAKE_COLOR_MAKEFILE ON) #Choose verbosity level SET(CMAKE_VERBOSE_MAKEFILE OFF) - -# Probably best to move all these path things to a single file -IF(WIN32) - SET(PACKAGE_LOCALE_DIR "locale") -ELSEIF(WIN32) - # TODO: check and change this to correct value: - SET(PACKAGE_LOCALE_DIR "locale") -ENDIF(WIN32) - - -SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) -SET(CMAKE_SKIP_RPATH:BOOL OFF) -SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts) + +SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts) +INCLUDE(ConfigPaths) INCLUDE(ConfigCompileFlags) INCLUDE(ConfigInkscapeDepends) -INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}" src/) -LINK_DIRECTORIES (src/) - #SET(CMAKE_MAJOR_MINOR "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}") #IF("${CMAKE_MAJOR_MINOR}" STREQUAL "2.2") # SET(CMAKE_AR "ar") @@ -65,5 +50,4 @@ po FOREACH(dirlist ${folders}) ADD_SUBDIRECTORY(${dirlist}) -ENDFOREACH(dirlist) - +ENDFOREACH(dirlist) diff --git a/CMakeScripts/ConfigCompileFlags.cmake b/CMakeScripts/ConfigCompileFlags.cmake index 679af6c92..d100dd466 100644 --- a/CMakeScripts/ConfigCompileFlags.cmake +++ b/CMakeScripts/ConfigCompileFlags.cmake @@ -23,4 +23,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_PROFILING_FLAGS} ") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_PROFILING_FLAGS} ") SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} ") +#Linking check +message(STATUS "@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") +message(STATUS "${INKSCAPE_LINK_FLAGS}") +message(STATUS "@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") diff --git a/CMakeScripts/ConfigInkscapeDepends.cmake b/CMakeScripts/ConfigInkscapeDepends.cmake index af826ed1f..bd2edfc48 100644 --- a/CMakeScripts/ConfigInkscapeDepends.cmake +++ b/CMakeScripts/ConfigInkscapeDepends.cmake @@ -41,7 +41,7 @@ FOREACH(dep ${INKSCAPE_DEPENDS}) message(STATUS "${dep}: FOUND") # Set Compiler Flags SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${dep_name}_CFLAGS}") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${dep_name}_CFLAGS}") +# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${dep_name}_CFLAGS}") SET(INKSCAPE_LINK_FLAGS "${INKSCAPE_LINK_FLAGS} ${${dep_name}_LINK_FLAGS}") ELSE("${dep}_FOUND") message(STATUS "${dep}: NOT FOUND") @@ -65,7 +65,8 @@ FOREACH(opt ${INKSCAPE_OPTIONAL}) # PKGCONFIG_VERSION(${opt} "${opt}_VERSION") IF("${opt}_FOUND") message(STATUS "${opt}: FOUND") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${dep_name}_CFLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${opt_name}_CFLAGS}") +# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${opt_name}_CFLAGS}") SET(INKSCAPE_LINK_FLAGS "${INKSCAPE_LINK_FLAGS} ${${opt_name}_LINK_FLAGS}") ELSE("${opt}_FOUND") message(STATUS "${opt}: NOT FOUND") @@ -146,5 +147,8 @@ ENDIF(HAVE_CAIRO_PDF) # Create them in the binary root dir CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h) FILE(WRITE ${CMAKE_BINARY_DIR}/inkscape_version.h "#define INKSCAPE_VERSION \"${INKSCAPE_VERSION}\"\n") -INCLUDE_DIRECTORIES ("${CMAKE_BINARY_DIR}") # Include base dir, so other files can refer to the generated files. -# CMAKE_INCLUDE_CURRENT_DIR is not enough as it only includes the current dir and not the basedir with config.h in it + +#Linking check +message(STATUS "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") +message(STATUS "${INKSCAPE_LINK_FLAGS}") +message(STATUS "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") diff --git a/CMakeScripts/ConfigPaths.cmake b/CMakeScripts/ConfigPaths.cmake new file mode 100644 index 000000000..ec3985e3f --- /dev/null +++ b/CMakeScripts/ConfigPaths.cmake @@ -0,0 +1,29 @@ +MESSAGE(STATUS "Creating build files in: ${CMAKE_CURRENT_BINARY_DIR}") + +IF(WIN32) + SET(PACKAGE_LOCALE_DIR "locale") +ELSEIF(WIN32) + # TODO: check and change this to correct value: + SET(PACKAGE_LOCALE_DIR "locale") +ENDIF(WIN32) + +SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) +SET(CMAKE_SKIP_RPATH:BOOL OFF) + +# Include base dir, so other files can refer to the generated files. +# CMAKE_INCLUDE_CURRENT_DIR is not enough as it only includes the current dir and not the basedir with config.h in it +INCLUDE_DIRECTORIES ("${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}" src/) +LINK_DIRECTORIES ("${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}" src/) + +#INSTALL(TARGETS INKSCAPE +# RUNTIME DESTINATION bin +# LIBRARY DESTINATION lib +# ARCHIVE DESTINATION lib +#) + +#FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +#INSTALL(FILES ${files} DESTINATION include/INKSCAPE/INKSCAPE) + +#CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/INKSCAPE.pc.in +# ${CMAKE_BINARY_DIR}/INKSCAPE.pc @ONLY IMMEDIATE ) +#INSTALL(FILES "${CMAKE_BINARY_DIR}/INKSCAPE.pc" DESTINATION lib/pkgconfig) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 094653cb6..4984daa17 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -601,8 +601,7 @@ version.cpp version.h zoom-context.cpp zoom-context.h -${ONLY_WIN} - +${ONLY_WIN} ) # make executable for INKSCAPE @@ -616,15 +615,4 @@ ADD_EXECUTABLE(inkview inkview.cpp) TARGET_LINK_LIBRARIES(inkview "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot ) -#INSTALL(TARGETS INKSCAPE -# RUNTIME DESTINATION bin -# LIBRARY DESTINATION lib -# ARCHIVE DESTINATION lib -#) - -#FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -#INSTALL(FILES ${files} DESTINATION include/INKSCAPE/INKSCAPE) - -#CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/INKSCAPE.pc.in -# ${CMAKE_BINARY_DIR}/INKSCAPE.pc @ONLY IMMEDIATE ) -#INSTALL(FILES "${CMAKE_BINARY_DIR}/INKSCAPE.pc" DESTINATION lib/pkgconfig) + diff --git a/src/dom/CMakeLists.txt b/src/dom/CMakeLists.txt index 30685be03..645999e0c 100644 --- a/src/dom/CMakeLists.txt +++ b/src/dom/CMakeLists.txt @@ -1,20 +1,47 @@ SET(dom_SRC -cssparser.cpp +css.h +cssreader.cpp +cssreader.h +dom.h domimpl.cpp +domimpl.h domptr.cpp +domptr.h domstring.cpp +domstring.h +events.h +ls.h lsimpl.cpp +lsimpl.h prop-css2.cpp prop-css.cpp prop-svg.cpp +smil.h smilimpl.cpp +smilimpl.h +stylesheets.h +svg.h svgimpl.cpp -svgparser.cpp +svgimpl.h +svgreader.cpp +svgreader.h +svgtypes.h +traversal.h ucd.cpp +ucd.h uri.cpp +uri.h +views.h +views-level3.h xmlreader.cpp +xmlreader.h xmlwriter.cpp +xmlwriter.h +xpath.h xpathimpl.cpp +xpathimpl.h xpathparser.cpp +xpathparser.h xpathtoken.cpp +xpathtoken.h )