diff options
| author | Sebastian Faubel <sebastian@semiodesk.com> | 2016-07-06 14:04:54 +0000 |
|---|---|---|
| committer | Sebastian Faubel <sebastian@semiodesk.com> | 2016-07-06 14:04:54 +0000 |
| commit | f381a48f549f2a3c4d7ec48a1458e7555306766b (patch) | |
| tree | 696505caf1b911585f56bc8397ec6b91f918ed89 | |
| parent | Added missing files. (diff) | |
| download | inkscape-f381a48f549f2a3c4d7ec48a1458e7555306766b.tar.gz inkscape-f381a48f549f2a3c4d7ec48a1458e7555306766b.zip | |
Fixed config.h defines to point to the right locations for data (icons) and locales.
(bzr r15002.1.5)
| -rw-r--r-- | CMakeLists.txt | 1 | ||||
| -rw-r--r-- | CMakeScripts/ConfigPaths.cmake | 13 | ||||
| -rw-r--r-- | CMakeScripts/Install.cmake | 2 | ||||
| -rw-r--r-- | config.h.cmake | 12 | ||||
| -rwxr-xr-x | mingwenv.bat | 8 | ||||
| -rw-r--r-- | mingwenv.cmake | 38 |
6 files changed, 40 insertions, 34 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 86ea1ecea..51d665128 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,6 +210,7 @@ message("") # cmake info message("CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") message("CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") +message("PACKAGE_LOCALE_DIR ${PACKAGE_LOCALE_DIR}") message("CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") message("CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}") message("CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") diff --git a/CMakeScripts/ConfigPaths.cmake b/CMakeScripts/ConfigPaths.cmake index cfe6c66b6..9774d4df2 100644 --- a/CMakeScripts/ConfigPaths.cmake +++ b/CMakeScripts/ConfigPaths.cmake @@ -1,9 +1,20 @@ message(STATUS "Creating build files in: ${CMAKE_CURRENT_BINARY_DIR}") if(WIN32) - set(PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale") # packagers might overwrite this + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/inkscape") + + set(INKSCAPE_LIBDIR "\\\\lib") + set(INKSCAPE_DATADIR "") + + set(PACKAGE_LOCALE_DIR "\\\\share\\\\locale") + set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") + + mark_as_advanced(SHARE_INSTALL) else() + set(INKSCAPE_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib") + set(INKSCAPE_DATADIR "${CMAKE_INSTALL_PREFIX}/share") + # TODO: check and change this to correct value: if(NOT PACKAGE_LOCALE_DIR) set(PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale") # packagers might overwrite this diff --git a/CMakeScripts/Install.cmake b/CMakeScripts/Install.cmake index e7311f080..6a95ce604 100644 --- a/CMakeScripts/Install.cmake +++ b/CMakeScripts/Install.cmake @@ -16,8 +16,6 @@ if(UNIX) # this should probably be done no matter what the platform is, just set SHARE_INSTALL first
add_subdirectory(share)
elseif(WIN32)
- set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/inkscape)
-
install(PROGRAMS
${EXECUTABLE_OUTPUT_PATH}/inkscape.exe
${EXECUTABLE_OUTPUT_PATH}/inkview.exe
diff --git a/config.h.cmake b/config.h.cmake index b30002622..00d6fb8b3 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -232,18 +232,10 @@ #cmakedefine HAVE_ZLIB_H 1 /* Base data directory -- only path-prefix.h should use it! */ -#ifdef WIN32 -#define INKSCAPE_DATADIR "" -#else -#define INKSCAPE_DATADIR "${CMAKE_INSTALL_PREFIX}/share" -#endif +#define INKSCAPE_DATADIR "${INKSCAPE_DATADIR}" /* Base library directory -- only path-prefix.h should use it! */ -#ifdef WIN32 -#define INKSCAPE_LIBDIR "\\lib" -#else -#define INKSCAPE_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" -#endif +#define INKSCAPE_LIBDIR "${INKSCAPE_LIBDIR}" /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ diff --git a/mingwenv.bat b/mingwenv.bat index 02068b72c..054e5dcc6 100755 --- a/mingwenv.bat +++ b/mingwenv.bat @@ -6,11 +6,11 @@ REM the Windows built-in command line (i.e. MSYS). REM ----------------------------------------------------------------------------- REM Directory containing the precompiled Inkscape libraries. Usually c:\devlibs or c:\devlibs64 -if "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=c:\devlibs +if "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=c:\devlibs64 REM Directory containing the MinGW instance used for compilation. Usually c:\mingw or c:\mingw64 REM Note: Make sure there are no whitespaces in the path. MinGW doesn't like that.. ;) -if "%MINGW_PATH%"=="" set MINGW_PATH=c:\mingw +if "%MINGW_PATH%"=="" set MINGW_PATH=c:\mingw64 REM Directory containing the (optional) Ghostscript installation. if "%GS_PATH%"=="" set GS_PATH=C:\latex\gs\gs8.61 @@ -18,6 +18,10 @@ if "%GS_PATH%"=="" set GS_PATH=C:\latex\gs\gs8.61 REM ----------------------------------------------------------------------------- @echo Setting environment variables for MinGW build of Inkscape.. +@echo DEVLIBS_PATH: %DEVLIBS_PATH% +@echo MINGW_PATH: %MINGW_PATH% +@echo GS_PATH: %GS_PATH% + REM Include the MinGW environment in the path to prevent error messages during CMake configure. set PATH=%DEVLIBS_PATH%\bin;%DEVLIBS_PATH%\python;%MINGW_PATH%\bin;%PATH%;%GS_PATH%\bin diff --git a/mingwenv.cmake b/mingwenv.cmake index 03a653b5d..9f7b8c3b1 100644 --- a/mingwenv.cmake +++ b/mingwenv.cmake @@ -5,10 +5,10 @@ # -----------------------------------------------------------------------------
# Directory containing the precompiled Inkscape libraries. Usually c:\devlibs or c:\devlibs64
-set(ENV_DEVLIBS_PATH C:/devlibs)
+set(ENV_DEVLIBS_PATH C:/devlibs64)
# Directory containing the MinGW instance used for compilation. Usually c:\mingw or c:\mingw64
-set(ENV_MINGW_PATH C:/mingw)
+set(ENV_MINGW_PATH C:/mingw64)
# Directory containing the (optional) Ghostscript installation.
set(ENV_GS_PATH C:/latex/gs/gs8.61)
@@ -18,27 +18,27 @@ set(ENV_GS_PATH C:/latex/gs/gs8.61) # -----------------------------------------------------------------------------
message(STATUS "Configuring MinGW environment:")
-if($ENV{DEVLIBS_PATH} STREQUAL "")
- message(STATUS "Setting path to development libraries from mingwenv.cmake: ${ENV_DEVLIBS_PATH}")
+if("$ENV{DEVLIBS_PATH}" STREQUAL "")
+ message(STATUS " Setting path to development libraries from mingwenv.cmake: ${ENV_DEVLIBS_PATH}")
set(DEVLIBS_PATH ${ENV_DEVLIBS_PATH})
else()
- message(STATUS "Setting path to development libraries from environment: $ENV{DEVLIBS_PATH}")
+ message(STATUS " Setting path to development libraries from environment: $ENV{DEVLIBS_PATH}")
set(DEVLIBS_PATH $ENV{DEVLIBS_PATH})
endif()
-if($ENV{MINGW_PATH} STREQUAL "")
- message(STATUS "Setting path to MinGW from mingwenv.cmake: ${ENV_MINGW_PATH}")
+if("$ENV{MINGW_PATH}" STREQUAL "")
+ message(STATUS " Setting path to MinGW from mingwenv.cmake: ${ENV_MINGW_PATH}")
set(MINGW_PATH ${ENV_MINGW_PATH})
else()
- message(STATUS "Setting path to MinGW from environment: $ENV{MINGW_PATH}")
+ message(STATUS " Setting path to MinGW from environment: $ENV{MINGW_PATH}")
set(MINGW_PATH $ENV{MINGW_PATH})
endif()
-if($ENV{GS_PATH} STREQUAL "")
- message(STATUS "Setting path to Ghostscript from mingwenv.cmake: ${ENV_GS_PATH}")
+if("$ENV{GS_PATH}" STREQUAL "")
+ message(STATUS " Setting path to Ghostscript from mingwenv.cmake: ${ENV_GS_PATH}")
set(GS_PATH ${ENV_GS_PATH})
else()
- message(STATUS "Setting path to Ghostscript from environment: $ENV{GS_PATH}")
+ message(STATUS " Setting path to Ghostscript from environment: $ENV{GS_PATH}")
set(GS_PATH $ENV{GS_PATH})
endif()
@@ -98,10 +98,10 @@ list(APPEND CMAKE_PROGRAM_PATH ${DEVLIBS_BIN}) set(HAVE_MINGW ON)
# Try to determine the MinGW processor architecture.
-if(EXISTS ${MINGW_PATH}/mingw32)
+if(EXISTS "${MINGW_PATH}/mingw32")
set(HAVE_MINGW64 OFF)
set(MINGW_ARCH mingw32)
-elseif(EXISTS ${MINGW_PATH}/x86_64-w64-mingw32)
+elseif(EXISTS "${MINGW_PATH}/x86_64-w64-mingw32")
set(HAVE_MINGW64 ON)
set(MINGW_ARCH x86_64-w64-mingw32)
else()
@@ -109,9 +109,9 @@ else() endif()
# Path to processor architecture specific binaries and libs.
-set(MINGW_ARCH_PATH ${MINGW_PATH}/${MINGW_ARCH})
+set(MINGW_ARCH_PATH "${MINGW_PATH}/${MINGW_ARCH}")
-set(MINGW_BIN ${MINGW_PATH}/bin)
+set(MINGW_BIN "${MINGW_PATH}/bin")
if(NOT EXISTS ${MINGW_BIN})
message(FATAL_ERROR "MinGW binary directory does not exist: ${MINGW_BIN}")
@@ -120,7 +120,7 @@ endif() # Eliminate error messages when not having mingw in the environment path variable.
list(APPEND CMAKE_PROGRAM_PATH ${MINGW_BIN})
-set(MINGW_LIB ${MINGW_PATH}/lib)
+set(MINGW_LIB "${MINGW_PATH}/lib")
if(NOT EXISTS ${MINGW_LIB})
message(FATAL_ERROR "MinGW library directory does not exist: ${MINGW_LIB}")
@@ -129,7 +129,7 @@ endif() # Add MinGW libraries to linker path.
link_directories(${MINGW_LIB})
-set(MINGW_INCLUDE ${MINGW_PATH}/include)
+set(MINGW_INCLUDE "${MINGW_PATH}/include")
if(NOT EXISTS ${MINGW_INCLUDE})
message(FATAL_ERROR "MinGW include directory does not exist: ${MINGW_INCLUDE}")
@@ -139,7 +139,7 @@ endif() include_directories(SYSTEM ${MINGW_INCLUDE})
if(HAVE_MINGW64)
- set(MINGW64_LIB ${MINGW_ARCH_PATH}/lib)
+ set(MINGW64_LIB "${MINGW_ARCH_PATH}/lib")
if(NOT EXISTS ${MINGW64_LIB})
message(FATAL_ERROR "MinGW 64-Bit libraries directory does not exist: ${MINGW64_LIB}")
@@ -148,7 +148,7 @@ if(HAVE_MINGW64) # Add 64-Bit libraries to linker path.
link_directories(${MINGW64_LIB})
- set(MINGW64_INCLUDE ${MINGW_ARCH_PATH}/include)
+ set(MINGW64_INCLUDE "${MINGW_ARCH_PATH}/include")
if(NOT EXISTS ${MINGW64_INCLUDE})
message(FATAL_ERROR "MinGW 64-Bit include directory does not exist: ${MINGW64_INCLUDE}")
|
