-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCMakeLists.txt
41 lines (38 loc) · 1.26 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.0)
project(ComboBox)
if (NOT VCPKG_TOOLCHAIN)
find_package(PkgConfig)
pkg_check_modules(GTKMM gtkmm-3.0)
include_directories(${GTKMM_INCLUDE_DIRS})
link_directories(${GTKMM_LIBRARY_DIRS})
link_libraries(${GTKMM_LIBRARIES})
else()
find_library(ATKMM_LIBRARY atkmm)
link_libraries(${ATKMM_LIBRARY})
find_library(CAIROMM_LIBRARY cairomm-1.0)
link_libraries(${CAIROMM_LIBRARY})
find_library(GDKMM_LIBRARY gdkmm)
link_libraries(${GDKMM_LIBRARY})
find_library(GIOMM_LIBRARY giomm)
link_libraries(${GIOMM_LIBRARY})
find_library(GLIBMM_LIBRARY glibmm)
link_libraries(${GLIBMM_LIBRARY})
find_library(GTKMM_LIBRARY gtkmm)
link_libraries(${GTKMM_LIBRARY})
find_library(PANGOMM_LIBRARY pangomm)
link_libraries(${PANGOMM_LIBRARY})
find_library(SIGC_LIBRARY sigc-2.0)
link_libraries(${SIGC_LIBRARY})
find_path(GTKMM_INCLUDE_DIRS gtkmm.h)
include_directories(${GTKMM_INCLUDE_DIRS})
endif()
if (MSVC)
set(GUI_OPTION WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup")
elseif (APPLE)
set(GUI_OPTION MACOSX_BUNDLE)
endif ()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(ComboBox ${GUI_OPTION} ComboBox.cpp)