- edited description
Trying to compile libgd 2.1.0 on Windows | Cmake Error
Hello guys,
I'm trying to compile libgd 2.1.0 but when i execute cmake with the following command :
C:\Users\xxxx\Desktop\Compilation GD 2.1.0\libgd-2.1.0>cmake -G"MinGW Makefile
" -DCMAKE_LIBRARY_PATH=c:\MinGW\lib -DCMAKE_INCLUDE_PATH=c:\MinGW\include .\src
I'm face this error :
CMake Error at CMakeLists.txt:83 (target_link_libraries):
target_link_libraries called with incorrect number of arguments
CMake Error at CMakeLists.txt:84 (target_link_libraries):
target_link_libraries called with incorrect number of arguments
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.8)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
Need some help ...
Comments (20)
-
Account Deleted -
hm, we have that line:
on line 6 in the main CMakeLists.txt:
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
Which cmake version do you use?
-
Account Deleted C:\Users\xxxx>cmake --version cmake version 2.8.11
I'm using CMake 2.8.11. The latest version so...
-
It should not fail, but only if the version is lower than 2.6. Weird.
-
Ah it must be at top of the file now. that's new in 2.8, will fix for the next release.
-
- changed status to resolved
fix
#81, cmake_minimum_required must be the 1st line in 2.8+→ <<cset a0f58c6abf7b>>
-
Account Deleted I tried to move the line but i don't think that's the real problem. It's a CMake Warning (dev) so not blocking.
The real problem is the both CMake Error (blocking) above this warning.
Here a cmake --trace for more information
C:\Users\xxxx\Desktop\Compilation GD 2.1.0\libgd-2.1.0>cmake -G"MinGW Makefiles " -DCMAKE_LIBRARY_PATH=c:\MinGW\lib -DCMAKE_INCLUDE_PATH=c:\MinGW\include .\src --trace
C:/Users/xxxx/Desktop/Compilation GD 2.1.0/libgd-2.1.0/src/CMakeLists.txt(83): target_link_libraries(${GD_LIB} ${ZLIB_LIBRARIES} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${LIQ_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARY} ${VPX_LIBRARIES} ) CMake Error at CMakeLists.txt:83 (target_link_libraries): target_link_libraries called with incorrect number of arguments C:/Users/xxxx/Desktop/Compilation GD 2.1.0/libgd-2.1.0/src/CMakeLists.txt(84): target_link_libraries(${GD_LIB_STATIC} ${ZLIB_LIBRARIES} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${LIQ_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARY} ${VPX_LIBRARIES} ) CMake Error at CMakeLists.txt:84 (target_link_libraries): target_link_libraries called with incorrect number of arguments
Regards,
-
Account Deleted - changed status to open
I tried to move the line but i don't think that's the real problem. It's a CMake Warning (dev) so not blocking.
The real problem is the both CMake Error (blocking) above this warning.
Here a cmake --trace for more information
C:\Users\xxxx\Desktop\Compilation GD 2.1.0\libgd-2.1.0>cmake -G"MinGW Makefiles " -DCMAKE_LIBRARY_PATH=c:\MinGW\lib -DCMAKE_INCLUDE_PATH=c:\MinGW\include .\src --trace
C:/Users/xxxx/Desktop/Compilation GD 2.1.0/libgd-2.1.0/src/CMakeLists.txt(83): target_link_libraries(${GD_LIB} ${ZLIB_LIBRARIES} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${LIQ_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARY} ${VPX_LIBRARIES} ) CMake Error at CMakeLists.txt:83 (target_link_libraries): target_link_libraries called with incorrect number of arguments C:/Users/xxxx/Desktop/Compilation GD 2.1.0/libgd-2.1.0/src/CMakeLists.txt(84): target_link_libraries(${GD_LIB_STATIC} ${ZLIB_LIBRARIES} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${LIQ_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARY} ${VPX_LIBRARIES} ) CMake Error at CMakeLists.txt:84 (target_link_libraries): target_link_libraries called with incorrect number of arguments
Regards,
-
Are you sure that you have all required libs in place?
-
Account Deleted Where i should put them ? ( I use minGW)
-
c:\MinGW\ as usual \lib and \include, also I'm not sure if it wants \ or / as path separator. Can you try / please? You can install them (with the -devel) files using the usual mingw command line install tools.
-
Hello!
I've got exactly the same error as kwentakill. The environment is the following:
- Windows 7 64-bit Home Extended
- C:\MinGW\
- cmake version 2.8.11.2
seems like something wrong with target_link_libraries invocation
Cheers
-
Account Deleted Thank you for reporting that @spestov. Any solution / fix for moment... Hope news and help soon...
-
Account Deleted Hello guys,
Holidays are over =) Any news about this issue ? Someone can help ?
Regards,
-
Looks like you're telling cmake to use
./src
as the top level dir.But, there is another problem (at least for me).
src/gd.h
isn't being automatically created fromsrc/gd.h.in
... my clever workaround is to rename it. This worked for me (note the..
at the end of the cmake line):C:\libgd-2.1.0>ren src\gd.h.in gd.h C:\libgd-2.1.0>md build C:\libgd-2.1.0>cd build C:\libgd-2.1.0\build>cmake -G"MinGW Makefiles" -DCMAKE_LIBRARY_PATH=C:\MinGW\lib -DCMAKE_INCLUDE_PATH=C:\MinGW\include .. C:\libgd-2.1.0\build>mingw32-make C:\libgd-2.1.0\build>mingw32-make install
-
@jigerst, could you share (a) your version of msys/mingw32, and (b) your tooling versions? Nobody on my team has had any success getting cmake to function on Windows.
-
repo owner OK, I will look into it. Surely a small thing as I always use CMake on win.
As of mingw, pls do not mix mingw build and vc, even for the deps :)
-
We have gotten cmake working with some edits to the cmake scripts (they appear to be out of date): https://github.com/imazen/gd-libgd
-
- changed status to closed
Fixed in 2.1.1
-
You can find a file 'thumbs.bat' in 2.1.1+. This file should be capable of downloading and compiling all dependencies, as well as libgd itself. If you're running into trouble with cmake or autotools, give thumbs.bat a try.
- Log in to comment