Re: [CMake] Question about find_package
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862328 On 16.03.19 13:34, workbe...@gmx.at wrote: > > The ClangConfig.cmake file is in /usr/share/llvm4.0/cmake ... > > On 16.03.19 13:11, workbe...@gmx.at wrote: >> Hi everyone, >> >> i'm on debian strech and there is a package called clang-4.0 that >> contains a ClangConfig.cmake in the >> >> path /usr/local/llvm/cmake but find_package(Clang 4.0 REQUIRED) is not >> able to find it.. it worked the day before.. i don't know what i'm doing >> wrong here. >> >> >> best regards! >> >> > pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Question about find_package
The ClangConfig.cmake file is in /usr/share/llvm4.0/cmake ... On 16.03.19 13:11, workbe...@gmx.at wrote: > Hi everyone, > > i'm on debian strech and there is a package called clang-4.0 that > contains a ClangConfig.cmake in the > > path /usr/local/llvm/cmake but find_package(Clang 4.0 REQUIRED) is not > able to find it.. it worked the day before.. i don't know what i'm doing > wrong here. > > > best regards! > > pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Question about find_package
Hi everyone, i'm on debian strech and there is a package called clang-4.0 that contains a ClangConfig.cmake in the path /usr/local/llvm/cmake but find_package(Clang 4.0 REQUIRED) is not able to find it.. it worked the day before.. i don't know what i'm doing wrong here. best regards! pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Question about find_packages.
I allways get the error: CMake Error at CMakeLists.txt:78 (find_package): Could not find a package configuration file provided by "Clang" (requested version 4.0) with any of the following names: libclang-4.0.soConfig.cmake libclang-4.0.so-config.cmake Add the installation prefix of "Clang" to CMAKE_PREFIX_PATH or set "Clang_DIR" to a directory containing one of the above files. If "Clang" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! On 15.03.19 17:03, workbe...@gmx.at wrote: > Hi everyone, > > i try to use find_packages for clang, i'm on debian and have installed > libclang-4.0-dev package, now i've the files in > /usr/lib/llvm4-0/lib/libclang-4.0.so and the include in > /usr/lib/llvm-4.0/include/clang - how can i make find_package find those ?? > > > best regards! > > pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Question about find_packages.
Hi everyone, i try to use find_packages for clang, i'm on debian and have installed libclang-4.0-dev package, now i've the files in /usr/lib/llvm4-0/lib/libclang-4.0.so and the include in /usr/lib/llvm-4.0/include/clang - how can i make find_package find those ?? best regards! pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Basic question how to find -lm include and lib dir with find_package or otherwise
Hi everyone, i'm searching for a way to find the right include dir so that -lm can be found, the is not find_package for this, is /usr/lib and /usr/include a default because he find it without me adding any include or lib path for the build. best regards! pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[cmake-developers] Question about fetching big repositories with ExternalProject_Add
Hi everyone, i play around much with ExternalProject_Add and i found some kind of "error". When fetching big repositories like llvm cmake don't show any output when cloning the repository which makes the user believe cmake stucks, is there a way to show the clone process with ExternalProject_Add() so the user does not believe cmake is stuck ?? It's find with normal repositories, but for example with llvm it's a nightmare. best regards! pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [CMake] Troubles with include_directories
I talked a long time on irc.freenode.org #cmake channel and got told everything you told me and more, i'm now aware of much more knowledge than before thanks to that channel. Thanks for your late answer anyway. best regards! On 10.03.19 16:09, Eric Noulard wrote: > > > Le sam. 9 mars 2019 à 08:44, workbe...@gmx.at > <mailto:workbe...@gmx.at> mailto:workbe...@gmx.at>> > a écrit : > > Hi everyone, > > i've a project setup that looks like this: > > > abc.h > > def.h > > and all my other .cpp and .h files are in the folder intern. Now my > CMakeLists.txt looks like this: > > cmake_minimum_required(VERSION 3.7) > project(BS_Application) > set(SRC > BS_AppTypes.hpp > BS_IEvent.hpp > BS_ISystem.hpp > BS_IWindow.hpp > BS_ITimerTask.hpp > BS_IEventConsumer.hpp > BS_Application.cpp > BS_Button.cpp > BS_ContextSDL.cpp > BS_ISystem.cpp > BS_System.cpp > BS_SystemSDL.cpp > BS_WindowSDL.cpp > BS_ContextSDL.cpp > BS_DisplayManagerSDL.cpp > BS_Button.cpp > BS_EventManager.cpp > BS_EventPrinter.cpp > BS_ModifierKeys.cpp > BS_DisplayManager.cpp > ) > set(INC > intern > ) > include_directories(${INC}) > add_library(BS_Application STATIC ${SRC}) > > Where all files above BS_Application.cpp are in the folder intern > but he > is not able to find BS_Application.cpp but i added it to the > include_direcotires, what am i doing wrong here ? > > > First of all usage of include_directories is a discouraged old-style > variable oriented CMake. > You should prefer target oriented rule. > Namelly target_include_directories(). > You can have a look > at: https://steveire.wordpress.com/2017/11/05/embracing-modern-cmake/ > and/or > refered presentation from Daniel Pfeifer or Mathieu Ropert there in. > It'll get you a broad view of the "Modern CMake way to go". > > Now both commands (target_include_directories or include_directories) > influence where *header* file are found. > So that if you say > > include_directories(${INC}) > add_library(BS_Application STATIC BS_Application.cpp) > > CMake won't go looking for "BS_Application.cpp" inside ${INC}. > You should refer to your source files with the proper path: > i.e. > add_library(BS_Application STATIC ${INC}/BS_Application.cpp) > > You may consider having a look at how to use target_source as well. > Craig Scott published a nice blog entry about that: > https://crascit.com/2016/01/31/enhanced-source-file-handling-with-target_sources/ > > Regards, > Eric > > > best regards! > > -- > > Powered by www.kitware.com <http://www.kitware.com> > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. > For more information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake > > > > -- > Eric pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()
I finally got it working, for other who might have the same problem: You just have to use ExternalProject_Add(ftgl-dl ... ) add_executable(Test01 ${SRC}) add_dependencies(Test01 ftgl-dl) That all! Happy coding! best regards! On 10.03.19 13:20, workbe...@gmx.at wrote: > > I got the problem solved again, but now i'm stuck... now i've the > following: > > > add_library(glad STATIC IMPORTED) > set_target_properties(glad PROPERTIES IMPORTED_LOCATION > ${LIB_DIR}/glad/lib/libglad.a) > > add_library(glfw3 STATIC IMPORTED) > set_target_properties(glfw3 PROPERTIES IMPORTED_LOCATION > ${LIB_DIR}/glew/lib/libglfw3.a) > > > add_executable(Test01 source/test/Test01.cpp) > target_link_libraries(Test01 PRIVATE glad glfw3) > > But now he can't find the header files which are also created after > the configuration, how to solve this problem ?? > > I hope you see i put much effort in this and find most of the problems > alone, i hope this time someone can help me out. > > > best regards! > > > On 10.03.19 12:38, workbe...@gmx.at wrote: >> >> I came a step forward, now it looks like this: >> >> include(ExternalProject) >> ExternalProject_Add(glfw3 >> PREFIX ${CMAKE_BINARY_DIR}/glfw-log >> GIT_REPOSITORY https://github.com/glfw/glfw.git >> GIT_TAG 3.2.1 >> SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw >> UPDATE_COMMAND "" >> PATCH_COMMAND "" >> INSTALL_DIR ${CMAKE_BINARY_DIR}/glfw >> CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE} >> -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw >> ) >> >> ExternalProject_Add(glad >> PREFIX ${CMAKE_BINARY_DIR}/glad-log >> GIT_REPOSITORY https://github.com/Dav1dde/glad.git >> GIT_TAG v0.1.29 >> SOURCE_DIR ${CMAKE_BINARY_DIR}/glad >> UPDATE_COMMAND "" >> PATCH_COMMAND "" >> INSTALL_DIR ${CMAKE_BINARY_DIR}/glad >> CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE} >> -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad -DGLAD_EXPORT=True >> -DGLAD_INSTALL=True >> CONFIGURE_COMMAND ${CMAKE_BUILD_DIR}/ >> INSTALL_COMMAND >> COMMAND ${CMAKE_COMMAND} -E copy >> ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/libglad.a >> ${LIB_DIR}/glad/lib/libglad.a >> COMMAND ${CMAKE_COMMAND} -E copy_directory >> ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/include ${LIB_DIR}/glad/ >> ) >> find_package(glad REQUIRED) >> find_package(glfw3 REQUIRED) >> add_executable(Test01 source/test/Test01.cpp) >> target_link_libraries(Test01 PRIVATE glad glfw3) >> >> But now i've the following problem, i get the error message: >> >> CMake Error at CMakeLists.txt:95 (find_package): >> By not providing "Findglad.cmake" in CMAKE_MODULE_PATH this project has >> asked CMake to find a package configuration file provided by >> "glad", but >> CMake did not find one. >> >> Could not find a package configuration file provided by "glad" with >> any of >> the following names: >> >> gladConfig.cmake >> glad-config.cmake >> >> Add the installation prefix of "glad" to CMAKE_PREFIX_PATH or set >> "glad_DIR" to a directory containing one of the above files. If "glad" >> provides a separate development package or SDK, be sure it has been >> installed. >> >> The problem is gladConfig.cmake is created after the configure >> procedure, how can i solve this issue ?? >> >> >> best regards! >> >> >> >> >> On 10.03.19 11:44, workbe...@gmx.at wrote: >>> >>> Now i've managed to create the right INSTALL_COMMAND but i don't >>> know how to link with my executable. i tried >>> >>> add_executable(MyApp ${src}) >>> >>> target_link_libraries(MyApp STATIC GLFW GLAD) >>> >>> and i get the following error message: >>> >>> CMake Error at CMakeLists.txt:96 (target_link_libraries): >>> Target "LIBGLAD" of type UTILITY may not be linked into another >>> target. >>> One may link only to INTERFACE, OBJECT, STATIC or SHARED >>> libraries, or to >>> executables with the ENABLE_EXPORTS property set. >>> >>> >>> CMake Error at CMakeLists.txt:96 (target_link_libraries): >>> Target "LIBGLFW" of type UTILITY may not be linked into another >>> target. >>> One may link only to INTERFACE, OBJECT, STATIC or SHARED >>> libraries, or
Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()
I got the problem solved again, but now i'm stuck... now i've the following: add_library(glad STATIC IMPORTED) set_target_properties(glad PROPERTIES IMPORTED_LOCATION ${LIB_DIR}/glad/lib/libglad.a) add_library(glfw3 STATIC IMPORTED) set_target_properties(glfw3 PROPERTIES IMPORTED_LOCATION ${LIB_DIR}/glew/lib/libglfw3.a) add_executable(Test01 source/test/Test01.cpp) target_link_libraries(Test01 PRIVATE glad glfw3) But now he can't find the header files which are also created after the configuration, how to solve this problem ?? I hope you see i put much effort in this and find most of the problems alone, i hope this time someone can help me out. best regards! On 10.03.19 12:38, workbe...@gmx.at wrote: > > I came a step forward, now it looks like this: > > include(ExternalProject) > ExternalProject_Add(glfw3 > PREFIX ${CMAKE_BINARY_DIR}/glfw-log > GIT_REPOSITORY https://github.com/glfw/glfw.git > GIT_TAG 3.2.1 > SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw > UPDATE_COMMAND "" > PATCH_COMMAND "" > INSTALL_DIR ${CMAKE_BINARY_DIR}/glfw > CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE} > -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw > ) > > ExternalProject_Add(glad > PREFIX ${CMAKE_BINARY_DIR}/glad-log > GIT_REPOSITORY https://github.com/Dav1dde/glad.git > GIT_TAG v0.1.29 > SOURCE_DIR ${CMAKE_BINARY_DIR}/glad > UPDATE_COMMAND "" > PATCH_COMMAND "" > INSTALL_DIR ${CMAKE_BINARY_DIR}/glad > CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE} > -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad -DGLAD_EXPORT=True > -DGLAD_INSTALL=True > CONFIGURE_COMMAND ${CMAKE_BUILD_DIR}/ > INSTALL_COMMAND > COMMAND ${CMAKE_COMMAND} -E copy > ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/libglad.a > ${LIB_DIR}/glad/lib/libglad.a > COMMAND ${CMAKE_COMMAND} -E copy_directory > ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/include ${LIB_DIR}/glad/ > ) > find_package(glad REQUIRED) > find_package(glfw3 REQUIRED) > add_executable(Test01 source/test/Test01.cpp) > target_link_libraries(Test01 PRIVATE glad glfw3) > > But now i've the following problem, i get the error message: > > CMake Error at CMakeLists.txt:95 (find_package): > By not providing "Findglad.cmake" in CMAKE_MODULE_PATH this project has > asked CMake to find a package configuration file provided by "glad", but > CMake did not find one. > > Could not find a package configuration file provided by "glad" with > any of > the following names: > > gladConfig.cmake > glad-config.cmake > > Add the installation prefix of "glad" to CMAKE_PREFIX_PATH or set > "glad_DIR" to a directory containing one of the above files. If "glad" > provides a separate development package or SDK, be sure it has been > installed. > > The problem is gladConfig.cmake is created after the configure > procedure, how can i solve this issue ?? > > > best regards! > > > > > On 10.03.19 11:44, workbe...@gmx.at wrote: >> >> Now i've managed to create the right INSTALL_COMMAND but i don't know >> how to link with my executable. i tried >> >> add_executable(MyApp ${src}) >> >> target_link_libraries(MyApp STATIC GLFW GLAD) >> >> and i get the following error message: >> >> CMake Error at CMakeLists.txt:96 (target_link_libraries): >> Target "LIBGLAD" of type UTILITY may not be linked into another target. >> One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, >> or to >> executables with the ENABLE_EXPORTS property set. >> >> >> CMake Error at CMakeLists.txt:96 (target_link_libraries): >> Target "LIBGLFW" of type UTILITY may not be linked into another target. >> One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, >> or to >> executables with the ENABLE_EXPORTS property set. >> >> >> >> target_link_libraries(M >> >> On 10.03.19 10:40, workbe...@gmx.at wrote: >>> Hi everyone, >>> >>> i've managed to use ExternalProject_Add to install GLFW but i have >>> troubles with glad... >>> >>> Here is my code for GLFW wich is working: >>> >>> include(ExternalProject) >>> ExternalProject_Add(GLFW >>> PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glfw-log >>> GIT_REPOSITORY https://github.com/glfw/glfw.git >>> GIT_TAG 3.2.1 >>> SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw >>> UPDATE_COMMAND "" >>> PATCH_COMMAND "" >>>
Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()
I came a step forward, now it looks like this: include(ExternalProject) ExternalProject_Add(glfw3 PREFIX ${CMAKE_BINARY_DIR}/glfw-log GIT_REPOSITORY https://github.com/glfw/glfw.git GIT_TAG 3.2.1 SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw UPDATE_COMMAND "" PATCH_COMMAND "" INSTALL_DIR ${CMAKE_BINARY_DIR}/glfw CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw ) ExternalProject_Add(glad PREFIX ${CMAKE_BINARY_DIR}/glad-log GIT_REPOSITORY https://github.com/Dav1dde/glad.git GIT_TAG v0.1.29 SOURCE_DIR ${CMAKE_BINARY_DIR}/glad UPDATE_COMMAND "" PATCH_COMMAND "" INSTALL_DIR ${CMAKE_BINARY_DIR}/glad CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad -DGLAD_EXPORT=True -DGLAD_INSTALL=True CONFIGURE_COMMAND ${CMAKE_BUILD_DIR}/ INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/libglad.a ${LIB_DIR}/glad/lib/libglad.a COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/include ${LIB_DIR}/glad/ ) find_package(glad REQUIRED) find_package(glfw3 REQUIRED) add_executable(Test01 source/test/Test01.cpp) target_link_libraries(Test01 PRIVATE glad glfw3) But now i've the following problem, i get the error message: CMake Error at CMakeLists.txt:95 (find_package): By not providing "Findglad.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "glad", but CMake did not find one. Could not find a package configuration file provided by "glad" with any of the following names: gladConfig.cmake glad-config.cmake Add the installation prefix of "glad" to CMAKE_PREFIX_PATH or set "glad_DIR" to a directory containing one of the above files. If "glad" provides a separate development package or SDK, be sure it has been installed. The problem is gladConfig.cmake is created after the configure procedure, how can i solve this issue ?? best regards! On 10.03.19 11:44, workbe...@gmx.at wrote: > > Now i've managed to create the right INSTALL_COMMAND but i don't know > how to link with my executable. i tried > > add_executable(MyApp ${src}) > > target_link_libraries(MyApp STATIC GLFW GLAD) > > and i get the following error message: > > CMake Error at CMakeLists.txt:96 (target_link_libraries): > Target "LIBGLAD" of type UTILITY may not be linked into another target. > One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, > or to > executables with the ENABLE_EXPORTS property set. > > > CMake Error at CMakeLists.txt:96 (target_link_libraries): > Target "LIBGLFW" of type UTILITY may not be linked into another target. > One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, > or to > executables with the ENABLE_EXPORTS property set. > > > > target_link_libraries(M > > On 10.03.19 10:40, workbe...@gmx.at wrote: >> Hi everyone, >> >> i've managed to use ExternalProject_Add to install GLFW but i have >> troubles with glad... >> >> Here is my code for GLFW wich is working: >> >> include(ExternalProject) >> ExternalProject_Add(GLFW >> PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glfw-log >> GIT_REPOSITORY https://github.com/glfw/glfw.git >> GIT_TAG 3.2.1 >> SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw >> UPDATE_COMMAND "" >> PATCH_COMMAND "" >> INSTALL_DIR ${LIBDIR}/glfw >> CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE} >> -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw >> ) >> >> Now i tried the same with GLAD but i had to add INSTALL_COMMAND to make >> it work but i've no clue what i should enter there to install it the >> same way i did with glfw.. >> >> ExternalProject_Add(GLAD >> PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glad-log >> GIT_REPOSITORY https://github.com/Dav1dde/glad.git >> GIT_TAG v0.1.29 >> SOURCE_DIR ${CMAKE_BINARY_DIR}/glad >> UPDATE_COMMAND "" >> PATCH_COMMAND "" >> INSTALL_DIR ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/glad >> CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE} >> -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad >> INSTALL_COMMAND "??" >> ) >> >> >> I hope someone can help me, i'm a bit clueless about this. >> >> >> best regards! >> >> > pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Question about INSTALL_COMMAND for ExternalProject_Add()
Now i've managed to create the right INSTALL_COMMAND but i don't know how to link with my executable. i tried add_executable(MyApp ${src}) target_link_libraries(MyApp STATIC GLFW GLAD) and i get the following error message: CMake Error at CMakeLists.txt:96 (target_link_libraries): Target "LIBGLAD" of type UTILITY may not be linked into another target. One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, or to executables with the ENABLE_EXPORTS property set. CMake Error at CMakeLists.txt:96 (target_link_libraries): Target "LIBGLFW" of type UTILITY may not be linked into another target. One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, or to executables with the ENABLE_EXPORTS property set. target_link_libraries(M On 10.03.19 10:40, workbe...@gmx.at wrote: > Hi everyone, > > i've managed to use ExternalProject_Add to install GLFW but i have > troubles with glad... > > Here is my code for GLFW wich is working: > > include(ExternalProject) > ExternalProject_Add(GLFW > PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glfw-log > GIT_REPOSITORY https://github.com/glfw/glfw.git > GIT_TAG 3.2.1 > SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw > UPDATE_COMMAND "" > PATCH_COMMAND "" > INSTALL_DIR ${LIBDIR}/glfw > CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE} > -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw > ) > > Now i tried the same with GLAD but i had to add INSTALL_COMMAND to make > it work but i've no clue what i should enter there to install it the > same way i did with glfw.. > > ExternalProject_Add(GLAD > PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glad-log > GIT_REPOSITORY https://github.com/Dav1dde/glad.git > GIT_TAG v0.1.29 > SOURCE_DIR ${CMAKE_BINARY_DIR}/glad > UPDATE_COMMAND "" > PATCH_COMMAND "" > INSTALL_DIR ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/glad > CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE} > -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad > INSTALL_COMMAND "??" > ) > > > I hope someone can help me, i'm a bit clueless about this. > > > best regards! > > pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Question about INSTALL_COMMAND for ExternalProject_Add()
Hi everyone, i've managed to use ExternalProject_Add to install GLFW but i have troubles with glad... Here is my code for GLFW wich is working: include(ExternalProject) ExternalProject_Add(GLFW PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glfw-log GIT_REPOSITORY https://github.com/glfw/glfw.git GIT_TAG 3.2.1 SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw UPDATE_COMMAND "" PATCH_COMMAND "" INSTALL_DIR ${LIBDIR}/glfw CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw ) Now i tried the same with GLAD but i had to add INSTALL_COMMAND to make it work but i've no clue what i should enter there to install it the same way i did with glfw.. ExternalProject_Add(GLAD PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glad-log GIT_REPOSITORY https://github.com/Dav1dde/glad.git GIT_TAG v0.1.29 SOURCE_DIR ${CMAKE_BINARY_DIR}/glad UPDATE_COMMAND "" PATCH_COMMAND "" INSTALL_DIR ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/glad CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad INSTALL_COMMAND "??" ) I hope someone can help me, i'm a bit clueless about this. best regards! pEpkey.asc Description: application/pgp-keys -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Troubles with include_directories
I mean belov, all files bellow BS_IEventConsumer.hpp (beginning with BS_Application) are in the intern folder in the same path as the other files above BS_Application. best regards! On 09.03.19 08:38, workbe...@gmx.at wrote: Hi everyone, i've a project setup that looks like this: abc.h def.h and all my other .cpp and .h files are in the folder intern. Now my CMakeLists.txt looks like this: cmake_minimum_required(VERSION 3.7) project(BS_Application) set(SRC BS_AppTypes.hpp BS_IEvent.hpp BS_ISystem.hpp BS_IWindow.hpp BS_ITimerTask.hpp BS_IEventConsumer.hpp BS_Application.cpp BS_Button.cpp BS_ContextSDL.cpp BS_ISystem.cpp BS_System.cpp BS_SystemSDL.cpp BS_WindowSDL.cpp BS_ContextSDL.cpp BS_DisplayManagerSDL.cpp BS_Button.cpp BS_EventManager.cpp BS_EventPrinter.cpp BS_ModifierKeys.cpp BS_DisplayManager.cpp ) set(INC intern ) include_directories(${INC}) add_library(BS_Application STATIC ${SRC}) Where all files above BS_Application.cpp are in the folder intern but he is not able to find BS_Application.cpp but i added it to the include_direcotires, what am i doing wrong here ? best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Troubles with include_directories
Hi everyone, i've a project setup that looks like this: abc.h def.h and all my other .cpp and .h files are in the folder intern. Now my CMakeLists.txt looks like this: cmake_minimum_required(VERSION 3.7) project(BS_Application) set(SRC BS_AppTypes.hpp BS_IEvent.hpp BS_ISystem.hpp BS_IWindow.hpp BS_ITimerTask.hpp BS_IEventConsumer.hpp BS_Application.cpp BS_Button.cpp BS_ContextSDL.cpp BS_ISystem.cpp BS_System.cpp BS_SystemSDL.cpp BS_WindowSDL.cpp BS_ContextSDL.cpp BS_DisplayManagerSDL.cpp BS_Button.cpp BS_EventManager.cpp BS_EventPrinter.cpp BS_ModifierKeys.cpp BS_DisplayManager.cpp ) set(INC intern ) include_directories(${INC}) add_library(BS_Application STATIC ${SRC}) Where all files above BS_Application.cpp are in the folder intern but he is not able to find BS_Application.cpp but i added it to the include_direcotires, what am i doing wrong here ? best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[cmake-developers] Error in ExternalProject_Add ??
Hi everyone, i'm trying to get ExternalProject_Add to work for a day now and i come to a strange error, first the code: set(BUILD_DIR "${CMAKE_BINARY_DIR}/build_files" CACHE STRING INTERNAL) set(BUILD_ENV "${CMAKE_BINARY_DIR}/build_env" CACHE STRING INTERNAL) set(LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib" CACHE STRING INTERNAL) include(ExternalProject) ExternalProject_Add( freetype TMP_DIR ${BULD_DIR} LIST_SEPARATOR ; PREFIX ${BUILD_ENV}/freetype GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit #CMAKE_ARGS -DCMAKE_INSTALL_PREFIX={LIBRARY_DIR}/freetype CONFIGURE_COMMAND "" BINARY_DIR "${BULD_ENV}" BUILD_COMMAND "cd ${BUILD_ENV}/freetype/src/freetype && ./autogen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) now the error i get is: CMake Error at /home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype-stamp/freetype-build-.cmake:16 (message): Command failed: No such file or directory 'cd /home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype && ./autogen.sh && ./configure && make' See also /home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype-stamp/freetype-build-*.log The log files are empty and when i run the command from the command line it's working... is this a bug or am i doing something really wrong ? best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [CMake] Problems with EnternalProjectAdd
Can't i somehow output the pwd ?? best regards! On 19.02.19 07:04, workbe...@gmx.at wrote: Now i'm getting: Command failed: No such file or directory 'cd /home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype && ./autogen.sh && ./configure && make' but when i go to my bsUltimate path and type that command it works... best regards! On 19.02.19 06:57, Romain LEGUAY wrote: Hi, I think you need to set the variable CONFIGURE_COMMAND to empty like this: ExternalProject_Add( freetype PREFIX "${BUILD_ENV}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit CONFIGURE_COMMAND "" BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) Envoyé de mon iPad Le 19 févr. 2019 à 06:51, workbe...@gmx.at <mailto:workbe...@gmx.at> mailto:workbe...@gmx.at>> a écrit : I played around a bit a now have the following: set(BUILD_ENV "${CMAKE_BINARY_DIR}/build_env" CACHE STRING INTERNAL) set(LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib" CACHE STRING INTERNAL) ExternalProject_Add( freetype PREFIX "${BUILD_ENV}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) The logs are telling me: CMake Error: The source directory "/home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype" does not appear to contain CMakeLists.txt. Isn't the BUILD_COMMAND there if there is no CMakeLists.txt file available for building ? not many project provide cmake build files best regards! On 19.02.19 06:43, Michael Ellery wrote: CMAKE_BUILD_DIR is not a standard variable (did you mean CMAKE_BINARY_DIR ?) - and the error seems to indicate that the variable is indeed empty so it tries to create the project directory at the root level. -Mike On Feb 18, 2019, at 8:58 PM, workbe...@gmx.at <mailto:workbe...@gmx.at> <mailto:workbe...@gmx.at>> wrote: Hi again, i try to install my dependencies with ExternalProjectAdd but it gives me troubles... what's wrong with ExternalProject_Add( freetype PREFIX "${CMAKE_BUILD_DIR}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) best regards! -- Powered by www.kitware.com <http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com <http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Problems with EnternalProjectAdd
Now i'm getting: Command failed: No such file or directory 'cd /home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype && ./autogen.sh && ./configure && make' but when i go to my bsUltimate path and type that command it works... best regards! On 19.02.19 06:57, Romain LEGUAY wrote: Hi, I think you need to set the variable CONFIGURE_COMMAND to empty like this: ExternalProject_Add( freetype PREFIX "${BUILD_ENV}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit CONFIGURE_COMMAND "" BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) Envoyé de mon iPad Le 19 févr. 2019 à 06:51, workbe...@gmx.at <mailto:workbe...@gmx.at> mailto:workbe...@gmx.at>> a écrit : I played around a bit a now have the following: set(BUILD_ENV "${CMAKE_BINARY_DIR}/build_env" CACHE STRING INTERNAL) set(LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib" CACHE STRING INTERNAL) ExternalProject_Add( freetype PREFIX "${BUILD_ENV}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) The logs are telling me: CMake Error: The source directory "/home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype" does not appear to contain CMakeLists.txt. Isn't the BUILD_COMMAND there if there is no CMakeLists.txt file available for building ? not many project provide cmake build files best regards! On 19.02.19 06:43, Michael Ellery wrote: CMAKE_BUILD_DIR is not a standard variable (did you mean CMAKE_BINARY_DIR ?) - and the error seems to indicate that the variable is indeed empty so it tries to create the project directory at the root level. -Mike On Feb 18, 2019, at 8:58 PM, workbe...@gmx.at <mailto:workbe...@gmx.at> <mailto:workbe...@gmx.at>> wrote: Hi again, i try to install my dependencies with ExternalProjectAdd but it gives me troubles... what's wrong with ExternalProject_Add( freetype PREFIX "${CMAKE_BUILD_DIR}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) best regards! -- Powered by www.kitware.com <http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com <http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Problems with EnternalProjectAdd
I played around a bit a now have the following: set(BUILD_ENV "${CMAKE_BINARY_DIR}/build_env" CACHE STRING INTERNAL) set(LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib" CACHE STRING INTERNAL) ExternalProject_Add( freetype PREFIX "${BUILD_ENV}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) The logs are telling me: CMake Error: The source directory "/home/stuv/data/projects/programming/bsUltimate/build/build_env/freetype/src/freetype" does not appear to contain CMakeLists.txt. Isn't the BUILD_COMMAND there if there is no CMakeLists.txt file available for building ? not many project provide cmake build files best regards! On 19.02.19 06:43, Michael Ellery wrote: CMAKE_BUILD_DIR is not a standard variable (did you mean CMAKE_BINARY_DIR ?) - and the error seems to indicate that the variable is indeed empty so it tries to create the project directory at the root level. -Mike On Feb 18, 2019, at 8:58 PM, workbe...@gmx.at wrote: Hi again, i try to install my dependencies with ExternalProjectAdd but it gives me troubles... what's wrong with ExternalProject_Add( freetype PREFIX "${CMAKE_BUILD_DIR}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Problems with EnternalProjectAdd
I forgot the error message: CMake Error at /usr/local/share/cmake-3.13/Modules/ExternalProject.cmake:1659 (file): file problem creating directory: /freetype/src/freetype-stamp Call Stack (most recent call first): /usr/local/share/cmake-3.13/Modules/ExternalProject.cmake:3057 (_ep_set_directories) bin/tools/cmake/modules/BSBasicTests.cmake:24 (ExternalProject_Add) CMakeLists.txt:33 (bs_install_dependencies) CMake Error at /usr/local/share/cmake-3.13/Modules/ExternalProject.cmake:1661 (message): dir '/freetype/src/freetype-stamp' does not exist after file(MAKE_DIRECTORY) Call Stack (most recent call first): /usr/local/share/cmake-3.13/Modules/ExternalProject.cmake:3057 (_ep_set_directories) bin/tools/cmake/modules/BSBasicTests.cmake:24 (ExternalProject_Add) CMakeLists.txt:33 (bs_install_dependencies) -- Configuring incomplete, errors occurred! See also "/home/stuv/data/projects/programming/bsUltimate/build/CMakeFiles/CMakeOutput.log". On 19.02.19 05:58, workbe...@gmx.at wrote: Hi again, i try to install my dependencies with ExternalProjectAdd but it gives me troubles... what's wrong with ExternalProject_Add( freetype PREFIX "${CMAKE_BUILD_DIR}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Problems with EnternalProjectAdd
Hi again, i try to install my dependencies with ExternalProjectAdd but it gives me troubles... what's wrong with ExternalProject_Add( freetype PREFIX "${CMAKE_BUILD_DIR}/freetype" GIT_REPOSITORY "https://github.com/brooklynpacket/freetype2.git; GIT_TAG 64bit BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype && ./autgen.sh && ./configure && make" LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON ) best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Question about set
Thank you. On 18.02.19 21:46, Craig Scott wrote: On Tue, Feb 19, 2019 at 4:16 AM Kyle Edwards via CMake mailto:cmake@cmake.org>> wrote: On Mon, 2019-02-18 at 17:59 +0100, Andreas Naumann wrote: > Hey, > > I would introduce a list with the allowed values and introduce a > macro > "checked_set", which tests the setting or aborts. > > Regards, > Andreas" > > Am 18.02.19 um 15:06 schrieb workbe...@gmx.at <mailto:workbe...@gmx.at>: > > > > Hi everyone, > > > > i've looked the web but found no result. I need a string variable > > that > > allows only certain values, like bool variables only allow > > true/false > > my string should be either "A" or "B" ... Is this a cache variable or a regular variable? Cache variables have this enum-like support in the form of the STRINGS property. Example: set(MYSTRING "A" CACHE STRING "Documentation for the variable") set_property(CACHE MYSTRING PROPERTY STRINGS "A;B") Note that this isn't an enforcing feature, only a convenience for CMake GUI and ccmake. It tells those tools what to show as selectable options for that cache variable, but you can still set the variable to anything you like via the cmake -D command line option or in the project itself. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/> -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Question about functions
Hi everyone, i have a function like: FUNCTION(checksyste_64Bit arg1) IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(${arg1} TRUE PARENT_SCOPE) ENDFUNCTION() but when i call it with an INTERNAL variable i've set before with SET(SYSTEM_64BIT FALSE CACHE INTERNAL) checksystem_64bit(${SYSTEM_64BIT}) the ${SYSTE_64BIT} variable stays the same, i thought when i use PARENT_SCOPE on a variable i can change it's value from inside the function ? best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Question about set
I need it for an INTERNAL variable, for the different android architecture types that are supported. so he can only set one of the available arch types. On 18.02.19 18:16, Kyle Edwards wrote: On Mon, 2019-02-18 at 17:59 +0100, Andreas Naumann wrote: Hey, I would introduce a list with the allowed values and introduce a macro "checked_set", which tests the setting or aborts. Regards, Andreas" Am 18.02.19 um 15:06 schrieb workbe...@gmx.at: Hi everyone, i've looked the web but found no result. I need a string variable that allows only certain values, like bool variables only allow true/false my string should be either "A" or "B" ... Is this a cache variable or a regular variable? Cache variables have this enum-like support in the form of the STRINGS property. Example: set(MYSTRING "A" CACHE STRING "Documentation for the variable") set_property(CACHE MYSTRING PROPERTY STRINGS "A;B") If you need to do this with an ordinary variable, consider using variable_watch(). Kyle -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Fwd: Re: Question about CMAKE_MODULE_PATH
Thanks alot! On 18.02.19 17:20, Gonzalo Garramuño wrote: El 18/2/19 a las 13:15, workbe...@gmx.at escribió: Thank you, that did the trick. Now my other question is there a function in cmake that does abort the build/makefile generation process ? for example if i find out the system is not 64bit - is there something like quit() ? message( FATAL_ERROR "your quit message" ) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Fwd: Re: Question about CMAKE_MODULE_PATH
Thank you, that did the trick. Now my other question is there a function in cmake that does abort the build/makefile generation process ? for example if i find out the system is not 64bit - is there something like quit() ? On 18.02.19 17:04, workbe...@gmx.at wrote: Forwarded Message Subject:Re: [CMake] Question about CMAKE_MODULE_PATH Date: Mon, 18 Feb 2019 16:58:26 +0100 From: workbe...@gmx.at To: Kyle Edwards here is my code: set(MODULE_PATH "compile/tools/cmake/modules") LIST(APPEND CMAKE_MODULE_PATH ${MODULE_PATH}) now i try to include with INCLUDE(basic_tests) and i get an error that the file can't be found when typing cmake ../ from within my build path. On 18.02.19 16:54, Kyle Edwards wrote: On Mon, 2019-02-18 at 16:50 +0100, workbe...@gmx.at wrote: Doesn't the content of CMAKE_MODULE_PATH should also include the path to the default modules ?? The default modules are automatically checked by CMake, independently of the contents of CMAKE_MODULE_PATH. They should not normally be present in CMAKE_MODULE_PATH. i try to load custom modules. i use list(append CMAKE_MODULE_PATH "/mypathtomdoules") The "append" argument should be uppercase: list(APPEND CMAKE_MODULE_PATH "/mypathtomodules") Did you receive any warnings about an invalid argument to list()? Kyle -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Fwd: Re: Question about CMAKE_MODULE_PATH
Forwarded Message Subject:Re: [CMake] Question about CMAKE_MODULE_PATH Date: Mon, 18 Feb 2019 16:58:26 +0100 From: workbe...@gmx.at To: Kyle Edwards here is my code: set(MODULE_PATH "compile/tools/cmake/modules") LIST(APPEND CMAKE_MODULE_PATH ${MODULE_PATH}) now i try to include with INCLUDE(basic_tests) and i get an error that the file can't be found when typing cmake ../ from within my build path. On 18.02.19 16:54, Kyle Edwards wrote: On Mon, 2019-02-18 at 16:50 +0100, workbe...@gmx.at wrote: Doesn't the content of CMAKE_MODULE_PATH should also include the path to the default modules ?? The default modules are automatically checked by CMake, independently of the contents of CMAKE_MODULE_PATH. They should not normally be present in CMAKE_MODULE_PATH. i try to load custom modules. i use list(append CMAKE_MODULE_PATH "/mypathtomdoules") The "append" argument should be uppercase: list(APPEND CMAKE_MODULE_PATH "/mypathtomodules") Did you receive any warnings about an invalid argument to list()? Kyle -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Question about CMAKE_MODULE_PATH
Doesn't the content of CMAKE_MODULE_PATH should also include the path to the default modules ?? On 18.02.19 16:48, workbe...@gmx.at wrote: Hi everyone, i try to load custom modules. i use list(append CMAKE_MODULE_PATH "/mypathtomdoules") and then i try to load the module with include(mymodule) but he can't find it. now i tried to output the content of CMAKE_MODULE_PATH with the cmake_print_variable from the CMakePrintHelpers module and the output of cmake_print_variables(CMAKE_MODULE_PATH) is "" ... what's going on here ? best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Question about CMAKE_MODULE_PATH
Hi everyone, i try to load custom modules. i use list(append CMAKE_MODULE_PATH "/mypathtomdoules") and then i try to load the module with include(mymodule) but he can't find it. now i tried to output the content of CMAKE_MODULE_PATH with the cmake_print_variable from the CMakePrintHelpers module and the output of cmake_print_variables(CMAKE_MODULE_PATH) is "" ... what's going on here ? best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Question about set
Hi everyone, i've looked the web but found no result. I need a string variable that allows only certain values, like bool variables only allow true/false my string should be either "A" or "B" ... best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Question about searching for another toolchain
Hello everyone, i'm realtively new to CMake and i find it awesome, the best building system ever ! Now to my question: I want to support either intel or amd specific functions in my application, that means i need either the amd or the intel sdk, i know how i can set another toolchain and stuff but how can i search for the different sdk's because the use have to install them and i don't know where. how can i make cmake find the toolchain i'm searching for ? best regards! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake