31 lines
1.2 KiB
CMake
31 lines
1.2 KiB
CMake
|
find_package (PkgConfig REQUIRED)
|
||
|
pkg_check_modules (GLIB2 REQUIRED glib-2.0)
|
||
|
pkg_check_modules (GTK3 REQUIRED gtk+-3.0)
|
||
|
pkg_check_modules (TEXPARSER REQUIRED texparser)
|
||
|
pkg_check_modules (TEXPARSER REQUIRED texreport)
|
||
|
include_directories (${GLIB2_INCLUDE_DIRS})
|
||
|
link_directories (${GLIB2_LIBRARY_DIRS})
|
||
|
if (CMAKE_COMPILER_IS_GNUCC)
|
||
|
add_definitions (${GLIB2_CFLAGS_OTHER})
|
||
|
endif ()
|
||
|
include_directories (${GTK3_INCLUDE_DIRS})
|
||
|
link_directories (${GTK3_LIBRARY_DIRS})
|
||
|
add_definitions (${GTK3_CFLAGS_OTHER})
|
||
|
include_directories (${TEXPARSER_INCLUDE_DIRS})
|
||
|
link_directories (${TEXPARSER_LIBRARY_DIRS})
|
||
|
add_definitions (${TEXPARSER_CFLAGS_OTHER})
|
||
|
include_directories (${TEXREPORT_INCLUDE_DIRS})
|
||
|
link_directories (${TEXREPORT_LIBRARY_DIRS})
|
||
|
add_definitions (${TEXREPORT_CFLAGS_OTHER})
|
||
|
|
||
|
vala_precompile (VALA_C hello_test.vala
|
||
|
PACKAGES gtk+-3.0
|
||
|
OPTIONS --thread
|
||
|
CUSTOM_VAPIS
|
||
|
GENERATE_VAPI texreport-gtk
|
||
|
GENERATE_HEADER texparser-gtk
|
||
|
)
|
||
|
|
||
|
add_executable (hello_vala ${VALA_C})
|
||
|
target_link_libraries (hello_vala ${GLIB2_LIBRARIES} ${GTK3_LIBRARIES} ${TEXPARSER_LIBRARIES} ${TEXREPORT_LIBRARIES})
|