2014-06-04 16:35:26 +02:00
|
|
|
project( calamareslib )
|
|
|
|
|
|
|
|
add_definitions( ${QT_DEFINITIONS} )
|
|
|
|
add_definitions( -DQT_SHARED )
|
|
|
|
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
|
|
|
|
|
2014-06-04 18:19:05 +02:00
|
|
|
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../calamares/Config.h.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/config.h )
|
|
|
|
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../calamares/CalamaresVersion.h.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h )
|
2014-06-04 16:35:26 +02:00
|
|
|
|
|
|
|
set( libSources
|
|
|
|
JobQueue.cpp
|
2014-06-04 18:19:05 +02:00
|
|
|
|
|
|
|
kdsingleapplicationguard/kdsingleapplicationguard.cpp
|
|
|
|
kdsingleapplicationguard/kdsharedmemorylocker.cpp
|
|
|
|
kdsingleapplicationguard/kdtoolsglobal.cpp
|
|
|
|
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
|
2014-06-06 16:00:42 +02:00
|
|
|
|
|
|
|
utils/CalamaresUtils.cpp
|
2014-06-18 18:05:04 +02:00
|
|
|
utils/Logger.cpp
|
2014-06-04 16:35:26 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
|
|
|
${QT_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
|
2014-06-04 18:19:05 +02:00
|
|
|
add_library( calamareslib SHARED ${libSources} )
|
|
|
|
set_target_properties( calamareslib
|
|
|
|
PROPERTIES
|
|
|
|
AUTOMOC TRUE
|
|
|
|
VERSION ${CALAMARES_VERSION_SHORT}
|
|
|
|
SOVERSION ${CALAMARES_VERSION_SHORT}
|
|
|
|
OUTPUT_NAME "calamares"
|
2014-06-04 16:35:26 +02:00
|
|
|
)
|
|
|
|
|
2014-06-06 16:00:42 +02:00
|
|
|
qt5_use_modules( calamareslib Core )
|
2014-06-04 16:35:26 +02:00
|
|
|
|
|
|
|
target_link_libraries( calamareslib
|
|
|
|
#LINK_PRIVATE
|
|
|
|
# internal deps, if any
|
|
|
|
|
|
|
|
LINK_PUBLIC
|
|
|
|
# External deps
|
2014-06-17 14:59:49 +02:00
|
|
|
Qt5::Core
|
2014-06-04 16:35:26 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
install( TARGETS calamareslib
|
|
|
|
EXPORT CalamaresLibraryDepends
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
# Install header files
|
|
|
|
file( GLOB rootHeaders "*.h" )
|
2014-06-04 18:19:05 +02:00
|
|
|
file( GLOB kdsingleapplicationguardHeaders "kdsingleapplicationguard/*.h" )
|
2014-06-06 16:00:42 +02:00
|
|
|
file( GLOB utilsHeaders "utils/*.h" )
|
2014-06-04 16:35:26 +02:00
|
|
|
|
|
|
|
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/libcalamares )
|
|
|
|
install( FILES ${rootHeaders} DESTINATION include/libcalamares )
|
2014-06-04 18:19:05 +02:00
|
|
|
install( FILES ${kdsingleapplicationguardHeaders} DESTINATION include/libcalamares/kdsingleapplicationguard )
|
2014-06-06 16:00:42 +02:00
|
|
|
install( FILES ${utilsHeaders} DESTINATION include/libcalamares/utils )
|