2013-02-27 04:17:39 +05:30
|
|
|
project(libUtil)
|
2013-02-21 06:40:09 +05:30
|
|
|
|
2014-04-06 21:42:48 +05:30
|
|
|
include(UseCXX11)
|
|
|
|
include(Coverage)
|
2013-02-22 01:10:32 +05:30
|
|
|
|
2013-02-21 06:40:09 +05:30
|
|
|
# Find Qt
|
|
|
|
find_package(Qt5Core REQUIRED)
|
|
|
|
|
|
|
|
# Include Qt headers.
|
|
|
|
include_directories(${Qt5Base_INCLUDE_DIRS})
|
|
|
|
|
2014-04-06 23:13:09 +05:30
|
|
|
set(LIBUTIL_SOURCES
|
2014-04-09 19:11:49 +05:30
|
|
|
include/libutil_config.h
|
2013-02-21 06:40:09 +05:30
|
|
|
|
2014-04-09 19:11:49 +05:30
|
|
|
include/pathutils.h
|
|
|
|
src/pathutils.cpp
|
2013-11-04 07:23:05 +05:30
|
|
|
|
2014-04-09 19:11:49 +05:30
|
|
|
include/osutils.h
|
2013-02-21 06:40:09 +05:30
|
|
|
|
2014-04-09 19:11:49 +05:30
|
|
|
include/userutils.h
|
|
|
|
src/userutils.cpp
|
2013-11-04 07:23:05 +05:30
|
|
|
|
2014-04-09 19:11:49 +05:30
|
|
|
include/cmdutils.h
|
|
|
|
src/cmdutils.cpp
|
2014-02-02 18:35:07 +05:30
|
|
|
|
2014-04-09 19:11:49 +05:30
|
|
|
include/modutils.h
|
|
|
|
src/modutils.cpp
|
2013-02-21 06:40:09 +05:30
|
|
|
)
|
|
|
|
|
|
|
|
# Set the include dir path.
|
2014-04-06 23:13:09 +05:30
|
|
|
set(LIBUTIL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
|
2013-02-21 06:40:09 +05:30
|
|
|
|
2013-08-26 06:23:29 +05:30
|
|
|
# Static link!
|
2014-04-06 23:13:09 +05:30
|
|
|
add_definitions(-DLIBUTIL_STATIC)
|
2013-08-26 06:23:29 +05:30
|
|
|
|
2013-02-27 04:17:39 +05:30
|
|
|
add_definitions(-DLIBUTIL_LIBRARY)
|
2013-02-21 06:40:09 +05:30
|
|
|
|
2013-08-26 06:23:29 +05:30
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
2013-11-04 07:23:05 +05:30
|
|
|
add_library(libUtil STATIC ${LIBUTIL_SOURCES})
|
2013-08-07 05:08:18 +05:30
|
|
|
qt5_use_modules(libUtil Core)
|
2013-02-27 04:17:39 +05:30
|
|
|
target_link_libraries(libUtil)
|