reactos/modules/rosapps/applications/explorer-old/CMakeLists.txt
Jérôme Gardou d6ea8659c8 [CMAKE] Get rid of the set_cpp macro
Instead of messing with global variables and the like, we introduce two target properties:
 - WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
 - WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
 - cpprt: for C++ runtime routines
 - cppstl: for the C++ standard template library

NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++

Finally, we manage the relevant flags with the ad-hoc generator expressions

So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module
2020-10-20 21:44:54 +02:00

62 lines
1.7 KiB
CMake

add_subdirectory(notifyhook)
add_definitions(
-DWIN32
-D__WINDRES__)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND SOURCE
shell/mainframe.cpp
shell/unixfs.cpp
shell/ntobjfs.cpp
shell/filechild.cpp
shell/shellfs.cpp
shell/fatfs.cpp
shell/pane.cpp
shell/regfs.cpp
shell/webchild.cpp
shell/entries.cpp
shell/shellbrowser.cpp
shell/winfs.cpp
dialogs/searchprogram.cpp
dialogs/settings.cpp
taskbar/taskbar.cpp
taskbar/favorites.cpp
taskbar/quicklaunch.cpp
taskbar/desktopbar.cpp
taskbar/startmenu.cpp
taskbar/traynotify.cpp
services/shellservices.cpp
desktop/desktop.cpp
explorer.cpp
utility/xs-native.cpp
utility/shellclasses.cpp
utility/dragdropimpl.cpp
utility/utility.cpp
utility/xmlstorage.cpp
utility/window.cpp
utility/shellbrowserimpl.cpp) # utility/shelltests.cpp
list(APPEND PCH_SKIP_SOURCE
services/startup.c)
if(ARCH STREQUAL "i386")
list(APPEND PCH_SKIP_SOURCE i386-stub-win32.c)
endif()
add_executable(explorer_old
${SOURCE}
${PCH_SKIP_SOURCE}
explorer.rc)
target_link_libraries(explorer_old comsupp wine uuid cppstl)
set_target_cpp_properties(explorer_old WITH_EXCEPTIONS WITH_RTTI)
set_module_type(explorer_old win32gui UNICODE)
add_importlibs(explorer_old advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 shlwapi notifyhook msvcrt kernel32 ntdll)
add_pch(explorer_old precomp.h "${PCH_SKIP_SOURCE}")
add_dependencies(explorer_old psdk)
add_cd_file(TARGET explorer_old DESTINATION reactos FOR all)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml DESTINATION reactos FOR all)