bugThe FreeType Project - Bugs: bug #43737, CMake is not working under windows

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43737: CMake is not working under windows

Submitter:  None
Submitted:  Tue 02 Dec 2014 11:12:10 AM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Need Info Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.6.1

Sun 28 Jun 2015 09:13:48 AM UTC, comment #5: 

I've completely revised the cmake stuff.  It now also covers your patch.  Please check.

Werner LEMBERG <wl>
Group administrator
Sat 06 Jun 2015 04:08:13 AM UTC, comment #4: 

Ping!  Any progress?

Werner LEMBERG <wl>
Group administrator
Thu 04 Dec 2014 03:23:44 PM UTC, comment #3: 

The problem is not the cmake stuff but `include/config/ftoption.h' and `Makefile' – it is very annoying if you call cmake directly within the FreeType git repository, and existing files are modified.

If I do

  cd foo
  cmake ~/git/freetype/freetype2

I'm expecting that all generated files are within the `foo' directory hierarchy, similarly to the behaviour of the UNIX configure script.  Testing this right now I see that this my assumption is wrong, which is absolutely horrible and non-standard.  I consider this a real bug in `CMakeLists.txt', and I would be glad if this gets fixed.

Just imagine that `~/git/freetype/freetype2' is a read-only directory...

Werner LEMBERG <wl>
Group administrator
Thu 04 Dec 2014 11:27:50 AM UTC, comment #2: 

I know, the patch is not perfect yet. The original file it not working on Windows, the script is only made for unix and osx.

The cmake output should be generated in the working directory, not in the project directory. Have you tried to call cmake from a different path? Something like

wl@linux-7rn6:~/git/freetype/freetype2/cmakebuild> cmake ~/git/freetype/freetype2

should create the makefile in ~/git/freetype/freetype2/cmakebuild.

Anonymous
Wed 03 Dec 2014 02:59:29 PM UTC, comment #1: 

Thanks for the patch.  However, I can't apply it since it doesn't work out of the box for UNIX-like platforms:

wl@linux-7rn6:~/git/freetype/freetype2> cmake CMakeLists.txt
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so - found
-- Creating /home/wl/git/freetype/freetype2/include/config/ftconfig.h.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wl/git/freetype/freetype2


wl@linux-7rn6:~/git/freetype/freetype2> make
Scanning dependencies of target freetype
[  1%] Building C object CMakeFiles/freetype.dir/src/autofit/autofit.c.o
In file included from /home/wl/git/freetype/freetype2/include/freetype.h:33:0,
                 from /home/wl/git/freetype/freetype2/src/autofit/afpic.c:20,
                 from /home/wl/git/freetype/freetype2/src/autofit/autofit.c:21:
/home/wl/git/freetype/freetype2/include/config/ftconfig.h:41:22: fatal error: ftoption.h: No such file or directory
compilation terminated.
make[2]: * [CMakeFiles/freetype.dir/src/autofit/autofit.c.o] Error 1
make[1]: * [CMakeFiles/freetype.dir/all] Error 2
make: * [all] Error 2


Note that I'm not a cmake user and thus have very limited understanding of this tool.  However, there is one big problem even obvious to me: Your patch makes cmake directly modify `include/config/ftconfig.h', ignoring `PROJECT_BINARY_DIR'.  This is an absolute no-no, especially if you are building within the git tree, for example.  Built files must be put into the build directory (or have a different name), and must not overwrite the original data!  Right now, `cmake' overwrites the top-level Makefile; I'm not happy with that and would be very glad if a cmake expert could change that so that the cmake-generated Makefile is put into a build directory.

Can you work on those issues?

Werner LEMBERG <wl>
Group administrator
Tue 02 Dec 2014 11:12:10 AM UTC, original submission:  

The CMakeLists.txt is not working on all platforms. Also, it would be nice to configure freetype from CMake (for example bzip2). CMake could be used to create a cross platform build solution.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #32582:  cmake.patch added by None (3KiB - text/plain - first patch to fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-28 wl Open/ClosedOpen Closed
        Planned ReleaseNone 2.6.1
    2014-12-03 wl StatusNone Need Info
        Assigned toNone wl
    2014-12-02 None Attached File- Added cmake.patch, #32582

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code