mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:13:05 +00:00
[CMAKE]
* Use the gcc toolchain-provided STL. * Use STLport only on MSVC builds. [KSPROXY] * Set imagebase, properly set its entry point, use set_cpp() instead of hardcoded definition/includes and add no exceptions/rtti gcc flags. [GLU32] * Use set_cpp() instead of the hardcoded target_link_libraries(). [PORTCLS] * Use set_module_type() with proper entry point, instead of expanded macro calls, and get rid of hardcoded target_link_libraries(). * Commit Dedicated to Olaf Siejka (Caemyr). svn path=/trunk/; revision=54082
This commit is contained in:
parent
f3a426e89f
commit
26a4093349
7 changed files with 21 additions and 32 deletions
|
@ -13,7 +13,6 @@ add_executable(sndrec32
|
||||||
sndrec32.cpp
|
sndrec32.cpp
|
||||||
rsrc.rc)
|
rsrc.rc)
|
||||||
|
|
||||||
target_link_libraries(sndrec32 stlport)
|
|
||||||
set_module_type(sndrec32 win32gui UNICODE)
|
set_module_type(sndrec32 win32gui UNICODE)
|
||||||
add_importlibs(sndrec32 winmm user32 msacm32 comctl32 comdlg32 gdi32 msvcrt kernel32)
|
add_importlibs(sndrec32 winmm user32 msacm32 comctl32 comdlg32 gdi32 msvcrt kernel32)
|
||||||
add_cd_file(TARGET sndrec32 DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET sndrec32 DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
|
||||||
macro(set_cpp)
|
macro(set_cpp)
|
||||||
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport)
|
|
||||||
set(IS_CPP 1)
|
set(IS_CPP 1)
|
||||||
add_definitions(
|
if(MSVC)
|
||||||
-DNATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/include/c++
|
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport)
|
||||||
-DNATIVE_C_INCLUDE=${REACTOS_SOURCE_DIR}/include/crt)
|
add_definitions(
|
||||||
|
-DNATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/include/c++
|
||||||
|
-DNATIVE_C_INCLUDE=${REACTOS_SOURCE_DIR}/include/crt)
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
function(add_dependency_node _node)
|
function(add_dependency_node _node)
|
||||||
|
|
|
@ -150,7 +150,7 @@ endfunction()
|
||||||
|
|
||||||
function(set_module_type_toolchain MODULE TYPE)
|
function(set_module_type_toolchain MODULE TYPE)
|
||||||
if(IS_CPP)
|
if(IS_CPP)
|
||||||
target_link_libraries(${MODULE} stlport -lsupc++ -lgcc)
|
target_link_libraries(${MODULE} -lstdc++ -lsupc++ -lgcc -lmingwex)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${TYPE} STREQUAL kernelmodedriver)
|
if(${TYPE} STREQUAL kernelmodedriver)
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
|
|
||||||
|
set_cpp()
|
||||||
|
|
||||||
spec2def(ksproxy.ax ksproxy.spec)
|
spec2def(ksproxy.ax ksproxy.spec)
|
||||||
|
|
||||||
add_definitions(
|
|
||||||
-DNATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/include/c++
|
|
||||||
-DNATIVE_C_INCLUDE=${REACTOS_SOURCE_DIR}/include/crt)
|
|
||||||
|
|
||||||
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport)
|
|
||||||
|
|
||||||
add_library(ksproxy SHARED
|
add_library(ksproxy SHARED
|
||||||
allocator.cpp
|
allocator.cpp
|
||||||
basicaudio.cpp
|
basicaudio.cpp
|
||||||
|
@ -28,17 +24,16 @@ add_library(ksproxy SHARED
|
||||||
qualityforward.cpp
|
qualityforward.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/ksproxy.def)
|
${CMAKE_CURRENT_BINARY_DIR}/ksproxy.def)
|
||||||
|
|
||||||
set_entrypoint(ksproxy 0)
|
set_module_type(ksproxy win32dll ENTRYPOINT 0)
|
||||||
set_target_properties(ksproxy PROPERTIES SUFFIX ".ax")
|
set_target_properties(ksproxy PROPERTIES SUFFIX ".ax")
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_target_compile_flags(ksproxy "/GR-")
|
add_target_compile_flags(ksproxy "/GR-")
|
||||||
else()
|
else()
|
||||||
#FIXME : can't build if this is enabled, check if this is needed
|
add_target_compile_flags(ksproxy "-fno-exceptions -fno-rtti")
|
||||||
#add_target_compile_flags(ksproxy "-fno-exceptions -fno-rtti")
|
|
||||||
target_link_libraries(ksproxy -lsupc++ -lgcc -lmingw32 oldnames)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(ksproxy stlport strmiids)
|
target_link_libraries(ksproxy strmiids)
|
||||||
|
|
||||||
add_importlibs(ksproxy
|
add_importlibs(ksproxy
|
||||||
advapi32
|
advapi32
|
||||||
|
@ -49,6 +44,4 @@ add_importlibs(ksproxy
|
||||||
kernel32
|
kernel32
|
||||||
ntdll)
|
ntdll)
|
||||||
|
|
||||||
add_dependencies(ksproxy psdk)
|
|
||||||
|
|
||||||
add_cd_file(TARGET ksproxy DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET ksproxy DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
|
||||||
|
set_cpp()
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DRESOLVE_3D_TEXTURE_SUPPORT
|
-DRESOLVE_3D_TEXTURE_SUPPORT
|
||||||
-DBUILD_GL32
|
-DBUILD_GL32
|
||||||
|
@ -110,10 +112,6 @@ add_library(glu32 SHARED ${SOURCE})
|
||||||
allow_warnings(glu32)
|
allow_warnings(glu32)
|
||||||
set_module_type(glu32 win32dll ENTRYPOINT 0 )
|
set_module_type(glu32 win32dll ENTRYPOINT 0 )
|
||||||
|
|
||||||
if(NOT MSVC)
|
|
||||||
target_link_libraries(glu32 stlport -lsupc++ -lgcc -lmingw32 oldnames)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_importlibs(glu32
|
add_importlibs(glu32
|
||||||
opengl32
|
opengl32
|
||||||
gdi32
|
gdi32
|
||||||
|
|
|
@ -53,20 +53,15 @@ add_library(portcls SHARED
|
||||||
|
|
||||||
target_link_libraries(portcls
|
target_link_libraries(portcls
|
||||||
libcntpr
|
libcntpr
|
||||||
stlport
|
|
||||||
${PSEH_LIB})
|
${PSEH_LIB})
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_target_compile_flags(portcls "/GR-")
|
add_target_compile_flags(portcls "/GR-")
|
||||||
else()
|
else()
|
||||||
target_link_libraries(portcls -lgcc)
|
|
||||||
add_target_compile_flags(portcls "-fno-exceptions -fno-rtti")
|
add_target_compile_flags(portcls "-fno-exceptions -fno-rtti")
|
||||||
endif(MSVC)
|
endif()
|
||||||
|
|
||||||
|
set_module_type(portcls kernelmodedriver ENTRYPOINT 0 )
|
||||||
add_pch(portcls private.hpp)
|
add_pch(portcls private.hpp)
|
||||||
set_entrypoint(portcls 0)
|
|
||||||
set_image_base(portcls 0x00010000)
|
|
||||||
set_subsystem(portcls native)
|
|
||||||
set_target_properties(portcls PROPERTIES SUFFIX ".sys")
|
|
||||||
add_importlibs(portcls ntoskrnl ks drmk hal)
|
add_importlibs(portcls ntoskrnl ks drmk hal)
|
||||||
add_cd_file(TARGET portcls DESTINATION reactos/system32/drivers FOR all)
|
add_cd_file(TARGET portcls DESTINATION reactos/system32/drivers FOR all)
|
||||||
|
|
4
reactos/lib/3rdparty/CMakeLists.txt
vendored
4
reactos/lib/3rdparty/CMakeLists.txt
vendored
|
@ -9,5 +9,7 @@ add_subdirectory(libmpg123)
|
||||||
add_subdirectory(libsamplerate)
|
add_subdirectory(libsamplerate)
|
||||||
add_subdirectory(libwine)
|
add_subdirectory(libwine)
|
||||||
add_subdirectory(libxml2)
|
add_subdirectory(libxml2)
|
||||||
add_subdirectory(stlport)
|
if(MSVC)
|
||||||
|
add_subdirectory(stlport)
|
||||||
|
endif()
|
||||||
add_subdirectory(zlib)
|
add_subdirectory(zlib)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue