2013-02-26 22:47:39 +00:00
|
|
|
project(libSettings)
|
2013-02-21 01:10:09 +00:00
|
|
|
|
|
|
|
# Find Qt
|
|
|
|
find_package(Qt5Core REQUIRED)
|
|
|
|
|
|
|
|
# Include Qt headers.
|
|
|
|
include_directories(${Qt5Base_INCLUDE_DIRS})
|
|
|
|
|
2014-04-06 16:12:48 +00:00
|
|
|
include(UseCXX11)
|
|
|
|
include(Coverage)
|
2013-02-21 01:10:09 +00:00
|
|
|
|
|
|
|
SET(LIBSETTINGS_SOURCES
|
2014-01-01 14:08:40 +00:00
|
|
|
libsettings_config.h
|
2013-02-26 22:47:39 +00:00
|
|
|
|
2014-01-01 14:08:40 +00:00
|
|
|
inifile.h
|
|
|
|
inifile.cpp
|
2013-02-25 19:24:46 +00:00
|
|
|
|
2014-01-01 14:08:40 +00:00
|
|
|
settingsobject.h
|
|
|
|
settingsobject.cpp
|
|
|
|
inisettingsobject.h
|
|
|
|
inisettingsobject.cpp
|
2013-03-22 13:40:55 +00:00
|
|
|
|
2014-01-01 14:08:40 +00:00
|
|
|
setting.h
|
|
|
|
setting.cpp
|
|
|
|
overridesetting.h
|
|
|
|
overridesetting.cpp
|
2013-02-21 01:10:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Set the include dir path.
|
2014-01-01 14:08:40 +00:00
|
|
|
SET(LIBSETTINGS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PARENT_SCOPE)
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2013-08-26 00:53:29 +00:00
|
|
|
# Static link!
|
|
|
|
ADD_DEFINITIONS(-DLIBSETTINGS_STATIC)
|
|
|
|
|
2013-02-26 22:47:39 +00:00
|
|
|
add_definitions(-DLIBSETTINGS_LIBRARY)
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2013-08-26 00:53:29 +00:00
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
2014-01-01 14:08:40 +00:00
|
|
|
add_library(libSettings STATIC ${LIBSETTINGS_SOURCES})
|
2013-02-26 22:47:39 +00:00
|
|
|
qt5_use_modules(libSettings Core)
|
|
|
|
target_link_libraries(libSettings)
|