Peter Kümmel wrote:
Hi,
attached configure and makefiles for the CMake build system.
If you wonder about this:
I use cmake because I know it best and cmake also creates
project files for IDEs (kdevelop, msvc).
CMake creates config.h (also under windows) and builds
makefiles for the specified compiler.
With this files I could compile Lyx/Qt4 under
Linux and Windows (MacOSX not tested).
I've tested it with Linux/gcc4.0, windows/mingw3.4,
windows/nmake-msvc8, and with the msvc8-IDE.
(the free as beer Visual C++ 2005 Express Edition)
Here the recipe:
- install cmake: http://cmake.org/HTML/Download.html
(cvs version is ok, under windows don't use a
path name with spaces)
- unpack the attached lyx-cmake.tar.bz2 into the same
folder where lyx-devel resides.
I am not sure where to put the file. Right now I have:
lyx/trunk/ : this is the main SVN branch
lyx/trunk/[boost, intl, src ...]
lyx/lyx-make/ this is where I extracted your archive
lyx/lyx-make/build : this is for the build process
- call in lyx-cmake: cmake -C put
(this copies the required files into lyx-devel)
- create a out-of-source folder for the build process
- create in this build-directory the makefiles:
msvc/IDE: cmake -G"Visual Studio 8 2005" ..\lyx-devel
D:\devel\lyx\lyx-cmake\build>cmake -G"Visual Studio 8 2005" .. > test
The C compiler "cl" is not able to compile a simple test program.
I have tried with the nornal console and the VC++ console but both fail
the same with the following output:
Microsoft (R) Visual C++ Express Edition Version 8.0.50727.42.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
Performing Post-Build Event...
"Checking build system"
Build log was saved at
"file://d:\devel\lyx\lyx-cmake\build\CMakeFiles\CMakeTmp\
ZERO_CHECK.dir\Debug\BuildLog.htm"
ZERO_CHECK - 0 error(s), 0 warning(s)
------ Build started: Project: cmTryCompileExec, Configuration: Debug
Win32 ----
--
Compiling...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42
for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /Od /D "_MBCS" /FD /EHsc /RTC1 /MDd /Fo"cmTryCompileExec.dir\Debug\\"
/Fd"Debug/cmTryCompileExec.pdb" /W3 /c /Zi /TC /DWIN32 /D_WINDOWS
/Zm1000 /D_DEBUG -DCMAKE_INTDIR=\"Debug\"
".\testCCompiler.c"
testCCompiler.c
Compiling manifest to resources...
Linking...
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
"/OUT:Debug\cmTryCompileExec.exe" /INCREMENTAL /MANIFEST
"/MANIFESTFILE:cmTryCom
pileExec.dir\Debug\cmTryCompileExec.exe.intermediate.manifest" /DEBUG
"/PDB:Debu
g\cmTryCompileExec.pdb" /SUBSYSTEM:CONSOLE /STACK:10000000 /machine:I386
/debug
kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
oleaut32.li
b uuid.lib comdlg32.lib advapi32.lib
".\cmTryCompileExec.dir\Debug\testCCompiler.obj"
".\cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res"
LINK : fatal error LNK1104: cannot open file 'user32.lib'
Build log was saved at
"file://d:\devel\lyx\lyx-cmake\build\CMakeFiles\CMakeTmp\
cmTryCompileExec.dir\Debug\BuildLog.htm"
cmTryCompileExec - 1 error(s), 0 warning(s)
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
CMake will not be able to correctly generate this project.
D:\devel\lyx\lyx-cmake\build>