From e025d5e0ef78ecb969027f520140e389980bece5 Mon Sep 17 00:00:00 2001 From: Sebastian Faubel Date: Tue, 26 Jul 2016 23:31:41 +0200 Subject: CMake on Windows produces same output as btool. Added inkscape.com and icon to inkview.exe Added msysenv.sh to support compiling using MSYS. (bzr r15023.1.1) --- src/CMakeLists.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4ba9b1f0..ef855d950 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -418,7 +418,7 @@ set(inkscape_SRC verbs.h version.h ) - + # ----------------------------------------------------------------------------- # Generate version file # ----------------------------------------------------------------------------- @@ -484,35 +484,33 @@ set(inkscape_SRC # ----------------------------------------------------------------------------- # Setup the executable # ----------------------------------------------------------------------------- -#add_inkscape_lib(sp_LIB "${sp_SRC}") -#add_inkscape_lib(inkscape_LIB "${inkscape_SRC}") +set(main_SRC main.cpp) +set(view_SRC inkview.cpp) -if(WIN32) +if(WIN32) # Sources for the inkscape executable on Windows. - set(main_SRC + list(APPEND main_SRC registrytool.h registrytool.cpp - main.cpp winmain.cpp - #winconsole.cpp ) # Add the platform specific resource files (enabling the app icon). if(${HAVE_MINGW64}) list(APPEND main_SRC inkscape-x64.rc) + list(APPEND view_SRC inkscape-x64.rc) else() list(APPEND main_SRC inkscape.rc) + list(APPEND view_SRC inkscape.rc) endif() -else() - set(main_SRC main.cpp) + + # Build the windows MS-DOS console executable. + add_executable(inkscape_com winconsole.cpp) endif() -# Build everything except main and inkview.c in a shared library. -add_library(inkscape_base SHARED ${inkscape_SRC} ${sp_SRC}) - # make executables for inkscape and inkview add_executable(inkscape ${main_SRC}) -add_executable(inkview inkview.cpp) +add_executable(inkview ${view_SRC}) add_dependencies(inkscape inkscape_version) @@ -545,6 +543,9 @@ if (NOT "${WITH_EXT_GDL}") list (INSERT INKSCAPE_TARGET_LIBS 0 "gdl_LIB") endif() +# Build everything except main and inkview.c in a shared library. +add_library(inkscape_base SHARED ${inkscape_SRC} ${sp_SRC}) + # Link the inkscape_base library against all external dependencies target_link_libraries(inkscape_base ${INKSCAPE_TARGET_LIBS}) -- cgit v1.2.3