-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (52 loc) · 1.48 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required (VERSION 3.0)
project (kmorph)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
find_package(KDE1 REQUIRED)
find_package(X11 REQUIRED)
include_directories (
${KDE1_INCLUDE_DIR}
)
include(CMakePackageConfigHelpers)
include(Qt1Macros)
include(KDE1Macros)
include(KDE1InstallDirs)
option(ENABLE_SANITIZERS "Enable runtime sanitizing (for development)")
if (ENABLE_SANITIZERS)
message("Enabling asan and ubsan")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
endif()
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -std=c++98 -Wno-write-strings")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
endif()
add_definitions(-DVERSION=\"0.1.5\")
qt1_wrap_moc(MOC_FILES
kalpha.h
kmorph.h
kmorphwin.h
)
add_executable(kmorph
morph.cpp kalpha.cpp kmorphwin.cpp kmorph.cpp
KFileDialog.cpp
${MOC_FILES}
)
target_link_libraries(kmorph
${KDE1_KDECORE}
${KDE1_KDEUI}
Qt::Qt1
X11::X11
)
install(TARGETS kmorph RUNTIME DESTINATION ${KDE1_BINDIR})
install_icon(kmorph.xpm)
install(FILES kmorph.kdelnk DESTINATION ${KDE1_APPSDIR}/Settings/)
install(FILES
icons/dispcolor.xpm
icons/movedest.xpm
icons/movesrc.xpm
icons/select.xpm
icons/line.xpm
DESTINATION ${KDE1_TOOLBARDIR}
)