aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-09 08:36:27 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-09 08:36:27 +0200
commit473c70634152eeee9ac24a1a422cae69702374ff (patch)
tree18fb175d4c9f6d42ef3e988693789c0e4e7b193f /src/CMakeLists.txt
parentf754c6a24bbe09e3c9c28873487c03022fdce399 (diff)
parent0dd15ce592976c4e6cc1383fbb48d5cff469bd84 (diff)
downloadayatana-ido-473c70634152eeee9ac24a1a422cae69702374ff.tar.gz
ayatana-ido-473c70634152eeee9ac24a1a422cae69702374ff.tar.bz2
ayatana-ido-473c70634152eeee9ac24a1a422cae69702374ff.zip
Merge branch 'tari01-pr/add-missing-target-libs'
Attributes GH PR #43: https://github.com/AyatanaIndicators/ayatana-ido/pull/43
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt138
1 files changed, 74 insertions, 64 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bb93dc3..d0f023e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -98,6 +98,7 @@ add_custom_command(
set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
add_library("ayatana-ido3-0.4" SHARED ${SOURCES})
set_target_properties("ayatana-ido3-0.4" PROPERTIES VERSION 0.0.0 SOVERSION 0)
+target_link_libraries("ayatana-ido3-0.4" ${PROJECT_DEPS_LIBRARIES})
target_include_directories("ayatana-ido3-0.4" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
target_include_directories("ayatana-ido3-0.4" PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories("ayatana-ido3-0.4" PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
@@ -108,69 +109,78 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-ido3-0.4.so.0.0.0" DESTINA
# ayatana-ido3-0.4.gir
-set(HEADERS
- idocalendarmenuitem.h
- idoentrymenuitem.h
- idorange.h
- idoscalemenuitem.h
- idoswitchmenuitem.h
- idotimeline.h
-)
-
find_package(GObjectIntrospection REQUIRED QUIET)
-add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir"
- DEPENDS "ayatana-ido3-0.4"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND
- ${INTROSPECTION_SCANNER}
- ${SOURCES} ${HEADERS}
- --symbol-prefix=ido
- --identifier-prefix=Ido
- --namespace=AyatanaIdo3
- --nsversion=0.4
- --quiet
- --pkg=gtk+-3.0
- --warn-all
- --include=Gtk-3.0
- --library="ayatana-ido3-0.4"
- --library-path=${CMAKE_CURRENT_BINARY_DIR}
- --output "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir"
-)
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
-
-# ayatana-ido3-0.4.typelib
-
-add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND
- ${INTROSPECTION_COMPILER}
- --includedir=${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir
- -o "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib"
-)
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0")
-
-# ayatana-ido3-0.4.vapi
-
-find_package(Vala REQUIRED QUIET)
-
-add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.vapi"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND
- ${VAPI_GEN}
- --library=AyatanaIdo3-0.4
- --pkg gtk+-3.0
- AyatanaIdo3-0.4.gir
-)
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.vapi" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/vala/vapi")
-
-add_custom_target("src" ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.vapi")
+if (INTROSPECTION_FOUND)
+
+ set(HEADERS
+ idocalendarmenuitem.h
+ idoentrymenuitem.h
+ idorange.h
+ idoscalemenuitem.h
+ idoswitchmenuitem.h
+ idotimeline.h
+ )
+
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir"
+ DEPENDS "ayatana-ido3-0.4"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND
+ ${INTROSPECTION_SCANNER}
+ ${SOURCES} ${HEADERS}
+ --symbol-prefix=ido
+ --identifier-prefix=Ido
+ --namespace=AyatanaIdo3
+ --nsversion=0.4
+ --quiet
+ --pkg=gtk+-3.0
+ --warn-all
+ --include=Gtk-3.0
+ --library="ayatana-ido3-0.4"
+ --library-path=${CMAKE_CURRENT_BINARY_DIR}
+ --output "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir"
+ )
+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
+
+ # ayatana-ido3-0.4.typelib
+
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib"
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMAND
+ ${INTROSPECTION_COMPILER}
+ --includedir=${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.gir
+ -o "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib"
+ )
+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0")
+
+
+ # ayatana-ido3-0.4.vapi
+
+ find_package(Vala REQUIRED QUIET)
+
+ if (VALA_FOUND)
+
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.vapi"
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.typelib"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMAND
+ ${VAPI_GEN}
+ --library=AyatanaIdo3-0.4
+ --pkg gtk+-3.0
+ AyatanaIdo3-0.4.gir
+ )
+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.vapi" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/vala/vapi")
+
+ add_custom_target("src" ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIdo3-0.4.vapi")
+
+ endif ()
+
+endif ()