calamares/src/modules/locale/CMakeLists.txt

58 lines
1.3 KiB
CMake
Raw Normal View History

find_package(ECM ${ECM_VERSION} NO_MODULE)
if( ECM_FOUND )
include( ECMAddTests )
endif()
find_package( Qt5 COMPONENTS Core Test REQUIRED )
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
set( geoip_src GeoIP.cpp GeoIPFreeGeoIP.cpp )
set( geoip_libs )
find_package(Qt5 COMPONENTS Xml)
if( Qt5Xml_FOUND )
list( APPEND geoip_src GeoIPXML.cpp )
list( APPEND geoip_libs Qt5::Xml )
add_definitions( -DHAVE_XML )
endif()
calamares_add_plugin( locale
TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
${geoip_src}
2014-11-25 17:40:38 +01:00
LCLocaleDialog.cpp
LocaleConfiguration.cpp
LocalePage.cpp
LocaleViewStep.cpp
2014-08-01 16:29:19 +02:00
SetTimezoneJob.cpp
timezonewidget/timezonewidget.cpp
timezonewidget/localeglobal.cpp
UI
RESOURCES
locale.qrc
2016-12-07 16:37:29 +01:00
LINK_PRIVATE_LIBRARIES
calamaresui
2016-12-07 16:37:29 +01:00
Qt5::Network
${geoip_libs}
2017-09-13 18:49:43 +02:00
${YAMLCPP_LIBRARY}
SHARED_LIB
)
if( ECM_FOUND )
ecm_add_test(
GeoIPTests.cpp
${geoip_src}
TEST_NAME
geoiptest
LINK_LIBRARIES
calamaresui
Qt5::Network
Qt5::Test
${geoip_libs}
${YAMLCPP_LIBRARY}
)
set_target_properties( geoiptest PROPERTIES AUTOMOC TRUE )
endif()