CMakeLists.txt 1.1 KB
Newer Older
Hurstel's avatar
Hurstel committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
cmake_minimum_required (VERSION 3.1)

SET( MOD_NAME CNT )

SET( MOD_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} )

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

find_package(Qt5 COMPONENTS Core Network Widgets)

set(CMAKE_AUTOMOC ON)

INCLUDE_DIRECTORIES(
    ${CORE_INCLUDE_DIR}
    ${MOD_ROOT_DIR}
    ${MOD_ROOT_DIR}/include
    ${CMAKE_CURRENT_BINARY_DIR}
)

file(
	GLOB_RECURSE
	MOD_FILES
        ${MOD_ROOT_DIR}/*.h
	${MOD_ROOT_DIR}/src/*.cpp
	${MOD_ROOT_DIR}/include/*.h
	${MOD_ROOT_DIR}/include/*.hpp
)

set(MOD_FILES ${MOD_FILES})
set(MODS ${MODS} PARENT_SCOPE)
set(MOD_LINK_LIBS ${MOD_LINK_LIBS})
if( ${Qt5Widgets_VERSION} VERSION_GREATER_EQUAL 5.11.0 )
    set(MOD_LINK_LIBS ${MOD_LINK_LIBS} ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES})
endif( ${Qt5Widgets_VERSION} VERSION_GREATER_EQUAL 5.11.0 )

add_mod_dependencies(Sett)

base_mod_compile()

if( ${Qt5Widgets_VERSION} VERSION_LESS 5.11.0 )
    qt5_use_modules(${MOD_NAME} Core Network Widgets)
endif( ${Qt5Widgets_VERSION} VERSION_LESS 5.11.0 )

set(MODS ${MODS} PARENT_SCOPE)
SET(MOD_DIRS ${MOD_DIRS} PARENT_SCOPE)