mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
CMake: Build deploy-stub
Closes #918 Co-authored-by: rdb <git@rdb.name>
This commit is contained in:
parent
e8f8604c08
commit
7b83eac943
@ -8,6 +8,7 @@ add_subdirectory(src/bam)
|
||||
add_subdirectory(src/converter)
|
||||
add_subdirectory(src/daeegg)
|
||||
add_subdirectory(src/daeprogs)
|
||||
add_subdirectory(src/deploy-stub)
|
||||
add_subdirectory(src/dxf)
|
||||
add_subdirectory(src/dxfegg)
|
||||
add_subdirectory(src/dxfprogs)
|
||||
|
41
pandatool/src/deploy-stub/CMakeLists.txt
Normal file
41
pandatool/src/deploy-stub/CMakeLists.txt
Normal file
@ -0,0 +1,41 @@
|
||||
if(NOT HAVE_PYTHON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_executable(deploy-stub deploy-stub.c)
|
||||
|
||||
if(IS_OSX)
|
||||
target_link_options(deploy-stub PRIVATE -sectcreate __PANDA __panda /dev/null)
|
||||
set_target_properties(deploy-stub PROPERTIES
|
||||
INSTALL_RPATH "@executable_path"
|
||||
BUILD_WITH_INSTALL_RPATH ON)
|
||||
|
||||
elseif(WIN32)
|
||||
target_sources(deploy-stub PRIVATE frozen_dllmain.c)
|
||||
|
||||
elseif(IS_LINUX OR IS_FREEBSD)
|
||||
set_target_properties(deploy-stub PROPERTIES
|
||||
INSTALL_RPATH "$ORIGIN"
|
||||
BUILD_WITH_INSTALL_RPATH ON)
|
||||
target_link_options(deploy-stub PRIVATE -Wl,-z,origin -rdynamic)
|
||||
endif()
|
||||
|
||||
target_link_libraries(deploy-stub Python::Python)
|
||||
install(TARGETS deploy-stub)
|
||||
|
||||
if(WIN32 OR IS_OSX)
|
||||
add_executable(deploy-stubw WIN32 deploy-stub.c)
|
||||
|
||||
if(IS_OSX)
|
||||
target_link_options(deploy-stubw PRIVATE -sectcreate __PANDA __panda /dev/null)
|
||||
set_target_properties(deploy-stubw PROPERTIES
|
||||
INSTALL_RPATH "@executable_path/../Frameworks"
|
||||
BUILD_WITH_INSTALL_RPATH ON)
|
||||
target_compile_definitions(deploy-stubw PRIVATE MACOS_APP_BUNDLE=1)
|
||||
elseif(WIN32)
|
||||
target_sources(deploy-stubw PRIVATE frozen_dllmain.c)
|
||||
endif()
|
||||
|
||||
target_link_libraries(deploy-stubw Python::Python)
|
||||
install(TARGETS deploy-stubw)
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user