2013-02-26 22:47:39 +00:00
|
|
|
project(libUtil)
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2014-04-06 17:12:48 +01:00
|
|
|
include(UseCXX11)
|
|
|
|
include(Coverage)
|
2013-02-21 19:40:32 +00:00
|
|
|
|
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 18:43:09 +01:00
|
|
|
set(LIBUTIL_SOURCES
|
|
|
|
include/libutil_config.h
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2014-04-06 18:43:09 +01:00
|
|
|
include/pathutils.h
|
|
|
|
src/pathutils.cpp
|
2013-11-04 01:53:05 +00:00
|
|
|
|
2014-04-06 18:43:09 +01:00
|
|
|
include/osutils.h
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2014-04-06 18:43:09 +01:00
|
|
|
include/userutils.h
|
|
|
|
src/userutils.cpp
|
2013-11-04 01:53:05 +00:00
|
|
|
|
2014-04-06 18:43:09 +01:00
|
|
|
include/cmdutils.h
|
|
|
|
src/cmdutils.cpp
|
2014-02-02 13:05:07 +00:00
|
|
|
|
2014-04-06 18:43:09 +01:00
|
|
|
include/modutils.h
|
|
|
|
src/modutils.cpp
|
2013-02-21 01:10:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Set the include dir path.
|
2014-04-06 18:43:09 +01:00
|
|
|
set(LIBUTIL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2013-08-26 01:53:29 +01:00
|
|
|
# Static link!
|
2014-04-06 18:43:09 +01:00
|
|
|
add_definitions(-DLIBUTIL_STATIC)
|
2013-08-26 01:53:29 +01:00
|
|
|
|
2013-02-26 22:47:39 +00:00
|
|
|
add_definitions(-DLIBUTIL_LIBRARY)
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2013-08-26 01:53:29 +01:00
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
2013-11-04 01:53:05 +00:00
|
|
|
add_library(libUtil STATIC ${LIBUTIL_SOURCES})
|
2013-08-07 00:38:18 +01:00
|
|
|
qt5_use_modules(libUtil Core)
|
2013-02-26 22:47:39 +00:00
|
|
|
target_link_libraries(libUtil)
|