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})
|
2013-08-07 00:38:18 +01:00
|
|
|
# include_directories(${Qt5Network_INCLUDE_DIRS})
|
2013-02-21 01:10:09 +00:00
|
|
|
|
2013-11-04 01:53:05 +00:00
|
|
|
SET(LIBUTIL_SOURCES
|
2013-02-21 01:10:09 +00:00
|
|
|
include/libutil_config.h
|
|
|
|
|
|
|
|
include/pathutils.h
|
2013-11-04 01:53:05 +00:00
|
|
|
src/pathutils.cpp
|
|
|
|
|
2013-02-21 01:10:09 +00:00
|
|
|
include/osutils.h
|
|
|
|
|
2013-11-04 01:53:05 +00:00
|
|
|
include/userutils.h
|
2013-02-21 19:40:32 +00:00
|
|
|
src/userutils.cpp
|
2013-11-04 01:53:05 +00:00
|
|
|
|
|
|
|
include/cmdutils.h
|
2013-02-21 19:40:32 +00:00
|
|
|
src/cmdutils.cpp
|
2014-02-02 13:05:07 +00:00
|
|
|
|
|
|
|
include/modutils.h
|
|
|
|
src/modutils.cpp
|
2013-02-21 01:10:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Set the include dir path.
|
2013-02-26 22:47:39 +00: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!
|
|
|
|
ADD_DEFINITIONS(-DLIBUTIL_STATIC)
|
|
|
|
|
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 Network)
|
|
|
|
qt5_use_modules(libUtil Core)
|
2013-02-26 22:47:39 +00:00
|
|
|
target_link_libraries(libUtil)
|