CuteCash Question (MSVC)
Martin Gill
martinsgill at gmail.com
Sat Apr 10 08:08:08 EDT 2010
2010/4/10 Christian Stimming <stimming at tuhh.de>:
> Hi Martin,
>
> Am Samstag, 10. April 2010 schrieb Martin Gill:
>> I'm curious about cute-cash and I'm trying to build it.
>>
[Snip Loads of Instructions]
>
> Regards,
>
> Christian
>
Thanks for all of that Christian, I'm a lot further now.
The current problem is that I cannot build the "engine" project. The
first problem was an issue with different behaviour on Windows.
The patch below solves that specific issue for me. (There's probably a
more efficient way to do this, but I'm new to CMake).
The remaining issue is that the iso-4217-currencies.c, generated by
that command, is in the wrong place.
Expected In: $GNUCASH_DIR\repos\src\engine
Actually In: $GNUCASH_DIR\build\src\engine
I'd have thought that " SET_SOURCE_FILES_PROPERTIES (gnc-commodity.c
PROPERTIES OBJECT_DEPENDS ${ISO_4217_C})" would have taken care of
this, either added the build/src/engine dir to additional include
directories or copied the file into the correct place. I tried
changing the value of ISO_4217_C to point to the source dir, but I
suspect OUTPUT is a hint, not a command, as it had no effect on where
the file was created.
I've not seen anyway to tell guile to generate the file in a different
place (if I'm correct in assuming guile is a scheme compiler).
Any Ideas?
Index: src/engine/CMakeLists.txt
===================================================================
--- src/engine/CMakeLists.txt (revision 19008)
+++ src/engine/CMakeLists.txt (working copy)
@@ -57,15 +57,27 @@
GNC_ADD_SWIG_COMMAND (${SWIG_ENGINE_C} ${CMAKE_CURRENT_SOURCE_DIR}/engine.i)
# Command to generate the iso-4217-currencies.c file
-SET (ISO_4217_C ${CMAKE_CURRENT_BINARY_DIR}/iso-4217-currencies.c)
-ADD_CUSTOM_COMMAND (
- OUTPUT ${ISO_4217_C}
- DEPENDS iso-4217-currencies.scm iso-currencies-to-c
- COMMAND
- GUILE_LOAD_PATH=@GNC_SRFI_LOAD_PATH@:${GUILE_LOAD_PATH}
- srcdir=${CMAKE_CURRENT_SOURCE_DIR}
- ${GUILE_EXECUTABLE} -s ${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c
-)
+SET (ISO_4217_C ${CMAKE_CURRENT_BUILD_DIR}/iso-4217-currencies.c)
+IF (WIN32)
+ ADD_CUSTOM_COMMAND (
+ OUTPUT ${ISO_4217_C}
+ DEPENDS iso-4217-currencies.scm iso-currencies-to-c
+ COMMAND
+ SET GUILE_LOAD_PATH=@GNC_SRFI_LOAD_PATH@:${GUILE_LOAD_PATH}
+ srcdir=${CMAKE_CURRENT_SOURCE_DIR}
+ ${GUILE_EXECUTABLE} -s ${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c
+ )
+ELSE (WIN32)
+ ADD_CUSTOM_COMMAND (
+ OUTPUT ${ISO_4217_C}
+ DEPENDS iso-4217-currencies.scm iso-currencies-to-c
+ COMMAND
+ GUILE_LOAD_PATH=@GNC_SRFI_LOAD_PATH@:${GUILE_LOAD_PATH}
+ srcdir=${CMAKE_CURRENT_SOURCE_DIR}
+ ${GUILE_EXECUTABLE} -s ${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c
+ )
+ENDIF (WIN32)
+
# Add dependency on iso-4217-currencies.c
SET_SOURCE_FILES_PROPERTIES (gnc-commodity.c PROPERTIES
OBJECT_DEPENDS ${ISO_4217_C})
--
Regards,
Martin
More information about the gnucash-devel
mailing list