CMakeLists.txt 1020 Bytes
Newer Older
1 2 3 4 5 6 7
cmake_minimum_required( VERSION 3.0 )

get_filename_component( CURRENT_TARGET ${CMAKE_CURRENT_SOURCE_DIR} NAME )
message( STATUS "  - " ${CURRENT_TARGET} )
project( ${CURRENT_TARGET} LANGUAGES CXX )

set( CMAKE_AUTOMOC ON )
8
set( CMAKE_AUTORCC ON )
9 10 11

file( GLOB LIB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h )
file( GLOB LIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp )
12 13
file( GLOB LIB_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.qrc )
generate_resource_solution_folders( ${LIB_RESOURCES} ALL_RESOURCE_FILES )
14

15
add_library( ${PROJECT_NAME} SHARED ${LIB_HEADERS} ${LIB_SOURCES} ${LIB_RESOURCES} ${ALL_RESOURCE_FILES} )
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

if( WIN32 )
target_link_libraries( ${CURRENT_TARGET}
    ${Qt5Widgets_LIBRARIES}
    GPU
    Interfaces
    UIData
    UIParam
    glew32 opengl32
)
else()
target_link_libraries( ${CURRENT_TARGET}
	${Qt5Widgets_LIBRARIES}
    GPU
    Interfaces
    UIData
    UIParam
	${GLEW_LIBRARIES}
	GL
)
endif()
37 38 39 40 41


if( ENABLE_SOLUTION_FOLDERS )
    set_target_properties( ${PROJECT_NAME} PROPERTIES FOLDER "Core" )
endif()