1 # Recurse into the "core" and "ui" subdirectories.
5 #ADD_SUBDIRECTORY(test)
7 # Make sure the compiler can find include files from our ui library.
8 INCLUDE_DIRECTORIES(${FREERECITE_SOURCE_DIR}/src/gui)
9 INCLUDE_DIRECTORIES(${FREERECITE_BINARY_DIR}/src/gui)
11 # Make sure the linker can find the ui library once it is built.
12 LINK_DIRECTORIES(${FREERECITE_BINARY_DIR}/src/gui)
14 # Make sure the compiler can find include files from our ui library.
15 INCLUDE_DIRECTORIES(${FREERECITE_SOURCE_DIR}/src/core)
17 # Make sure the linker can find the ui library once it is built.
18 LINK_DIRECTORIES(${FREERECITE_BINARY_DIR}/src/core)
20 # this command finds Qt4 libraries and sets all required variables
21 # note that it's Qt4, not QT4 or qt4
22 FIND_PACKAGE( Qt4 REQUIRED )
24 # add some useful macros and variables
25 # (QT_USE_FILE is a variable defined by FIND_PACKAGE( Qt4 ) that contains a path to CMake script)
26 INCLUDE( ${QT_USE_FILE} )
28 MESSAGE(STATUS "This is BINARY dir " ${FREERECITE_BINARY_DIR})
29 MESSAGE(STATUS "This is SOURCE dir " ${FREERECITE_SOURCE_DIR})
31 SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
33 SET(qfrt_EXE_SRCS qfrt.cpp)
38 # resource compilation for mingw
39 ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qfrt_rc.o
40 COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR}
41 -i${CMAKE_CURRENT_SOURCE_DIR}/qfrt.rc
42 -o ${CMAKE_CURRENT_BINARY_DIR}/qfrt_rc.o)
43 SET(qfrt_EXE_SRCS ${qfrt_EXE_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/qfrt_rc.o)
45 SET(qfrt_EXE_SRCS ${qfrt_EXE_SRCS} qfrt.rc)
47 ADD_EXECUTABLE(qfrt WIN32 ${qfrt_EXE_SRCS})
49 ADD_EXECUTABLE(qfrt ${qfrt_EXE_SRCS})
53 MESSAGE(STATUS "On *nix and frt for CUI will be build")
55 INCLUDE_DIRECTORIES(${FREERECITE_SOURCE_DIR}/src/ui)
56 LINK_DIRECTORIES(${FREERECITE_BINARY_DIR}/src/ui)
57 ADD_EXECUTABLE(frtcore frt.cpp)
58 TARGET_LINK_LIBRARIES(frtcore FreeReciteUi)
59 TARGET_LINK_LIBRARIES(frtcore FreeReciteCore)
60 INSTALL(PROGRAMS frt DESTINATION bin)
61 INSTALL(PROGRAMS ${PROJECT_BINARY_DIR}/bin/frtcore DESTINATION bin)
65 TARGET_LINK_LIBRARIES(qfrt
71 INSTALL(PROGRAMS ${PROJECT_BINARY_DIR}/bin/qfrt DESTINATION bin)