cmake

CMake error with gtkmm

不打扰是莪最后的温柔 提交于 2021-02-07 20:32:29
问题 I'm using Debian 8 and have installed libgtkmm-3.0 (and also -dev). Now I have a very simple program using gtkmm, basically a Hello World: main.cpp: #include "../include/BrowserWindow.class.hpp" #include <gtkmm/application.h> int main(int argv, char *argc[]) { Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example"); BrowserWindow helloworld; //Shows the window and returns when it is closed. return app->run(helloworld); } BrowserWindow.class.cpp: #include

How to set MSVC Target Platform Version with CMake?

杀马特。学长 韩版系。学妹 提交于 2021-02-07 20:31:51
问题 I'm searching for way to set Target Platform Version of MSVC project generated with CMake. I found the following ticket in CMake issue tracker which is now closed. I'm with latest 3.9.1 version of CMake . But the solution described there seems to not work. I tried set (CMAKE_SYSTEM_VERSION 8.1) in my CMakeLists.txt . How to set Terget Platform Version when using CMake? Afterwords: Now I checked that setting CMAKE_SYSTEM_VERSION from command line when generating solution works but I want if

How to set MSVC Target Platform Version with CMake?

北战南征 提交于 2021-02-07 20:30:55
问题 I'm searching for way to set Target Platform Version of MSVC project generated with CMake. I found the following ticket in CMake issue tracker which is now closed. I'm with latest 3.9.1 version of CMake . But the solution described there seems to not work. I tried set (CMAKE_SYSTEM_VERSION 8.1) in my CMakeLists.txt . How to set Terget Platform Version when using CMake? Afterwords: Now I checked that setting CMAKE_SYSTEM_VERSION from command line when generating solution works but I want if

CMake error with gtkmm

白昼怎懂夜的黑 提交于 2021-02-07 20:30:01
问题 I'm using Debian 8 and have installed libgtkmm-3.0 (and also -dev). Now I have a very simple program using gtkmm, basically a Hello World: main.cpp: #include "../include/BrowserWindow.class.hpp" #include <gtkmm/application.h> int main(int argv, char *argc[]) { Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example"); BrowserWindow helloworld; //Shows the window and returns when it is closed. return app->run(helloworld); } BrowserWindow.class.cpp: #include

How do I add objects with a custom extension to a cmake library?

巧了我就是萌 提交于 2021-02-07 20:10:54
问题 I'd like to add some object files to a CMake static library, but they have a custom extension. Here's what I've tried: set(SRCS testfile.cxx jsobj.js) add_library(testlib STATIC ${SRCS}) When made, CMake invokes ar testfile.cxx.o (ie the other file is completely ignored). How do I get it included in the archive? Here are some other tricks I've tried: list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS js) list(APPEND CMAKE_C_SOURCE_FILE_EXTENSIONS js) # no luck add_custom_command(OUTPUT ${CMAKE

How do I add objects with a custom extension to a cmake library?

南楼画角 提交于 2021-02-07 19:58:35
问题 I'd like to add some object files to a CMake static library, but they have a custom extension. Here's what I've tried: set(SRCS testfile.cxx jsobj.js) add_library(testlib STATIC ${SRCS}) When made, CMake invokes ar testfile.cxx.o (ie the other file is completely ignored). How do I get it included in the archive? Here are some other tricks I've tried: list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS js) list(APPEND CMAKE_C_SOURCE_FILE_EXTENSIONS js) # no luck add_custom_command(OUTPUT ${CMAKE

Cmake Linking Shared Library: “No such file or directory” when include a header file from library

怎甘沉沦 提交于 2021-02-07 18:41:44
问题 I am learning to build a library using Cmake. The code structure for building library is like below: include: Test.hpp ITest.hpp // interface src: Test.cpp ITest.cpp In CMakeLists.txt, the sentences I used to build library is : file(GLOB SRC_LIST "src/iTest.cpp" "src/Test.cpp" "include/Test.hpp" "include/iTest.hpp" "include/deadreckoning.hpp") add_library(test SHARED ${SRC_LIST}) target_link_libraries( test ${OpenCV_LIBS}) // link opencv libs to libtest.so Then I wrote another test file (main

CMake build error with added header file - fatal error: file not found

别等时光非礼了梦想. 提交于 2021-02-07 18:17:58
问题 I used CMake to build C++ source files in Ubuntu 14.04. I has a main source file. This includes a header file, which contains a function in another source file. My main source file is DisplayImage.cpp, and my header file is Camera.h with a source file Camera.cpp. Every file is located in one folder. And I have a CmakeLists.txt: cmake_minimum_required(VERSION 2.8) project( DisplayImage ) find_package( OpenCV REQUIRED ) add_executable( DisplayImage DisplayImage.cpp Camera.cpp ) target_link

Cmake FindBoost.cmake MinGW-W64: searching for library with incorrect name

狂风中的少年 提交于 2021-02-07 17:30:45
问题 I have built Boost 1.68 (using instructions from https://gist.github.com/sim642/29caef3cc8afaa273ce6, and adding link=static,shared to the b2 command line to also build shared libraries.) The libraries appear to build correctly, and I have set the BOOST_INCLUDEDIR and BOOST_LIBRARYDIR environment variables correctly. However, when I add the following to a CMakeLists.txt : find_package(Boost REQUIRED COMPONENTS system context coroutine thread random REQUIRED) and generate with MinGW Makefiles

Cmake FindBoost.cmake MinGW-W64: searching for library with incorrect name

房东的猫 提交于 2021-02-07 17:29:02
问题 I have built Boost 1.68 (using instructions from https://gist.github.com/sim642/29caef3cc8afaa273ce6, and adding link=static,shared to the b2 command line to also build shared libraries.) The libraries appear to build correctly, and I have set the BOOST_INCLUDEDIR and BOOST_LIBRARYDIR environment variables correctly. However, when I add the following to a CMakeLists.txt : find_package(Boost REQUIRED COMPONENTS system context coroutine thread random REQUIRED) and generate with MinGW Makefiles