• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3if(UNIX)
4    ### Copy the 64-bit ELF file into the binaries folder for later use.
5    ### Also, copy the 64-bit ELF-but call it a DLL so that we can use the wrong target (ELF vs. PE) on Windows
6    #
7    ### NOTE: Uncomment the following to rebuild the targets
8    #
9    #add_library(dummy_library_elf_64 SHARED stub.cpp)
10    #set_target_properties(dummy_library_elf_64 PROPERTIES COMPILE_OPTIONS "-m64" LINK_FLAGS "-m64")
11    #add_custom_command(TARGET dummy_library_elf_64 POST_BUILD
12    #    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_elf_64> ${CMAKE_CURRENT_SOURCE_DIR}/binaries
13    #    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_elf_64> ${CMAKE_CURRENT_SOURCE_DIR}/binaries/dummy_library_elf_64.dll)
14
15    ### Copy the 32-bit ELF file into the binaries folder for later use.
16    ### Also, copy the 32-bit ELF-but call it a DLL so that we can use the wrong target (ELF vs. PE) on Windows
17    #
18    ### NOTE: Uncomment the following to rebuild the targets
19    #
20    #add_library(dummy_library_elf_32 SHARED stub.cpp)
21    #set_target_properties(dummy_library_elf_32 PROPERTIES COMPILE_OPTIONS "-m32" LINK_FLAGS "-m32")
22    #add_custom_command(TARGET dummy_library_elf_32 POST_BUILD
23    #    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_elf_32> ${CMAKE_CURRENT_SOURCE_DIR}/binaries
24    #    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_elf_32> ${CMAKE_CURRENT_SOURCE_DIR}/binaries/dummy_library_elf_32.dll)
25endif()
26
27if(WIN32)
28    ### Copy the 64-bit PE file into the binaries folder for later use.
29    ### Also, copy the 64-bit PE-but call it a SO so that we can use the wrong target (ELF vs. PE) on Linux
30    #
31    ### NOTE: Uncomment the following to rebuild the targets
32    #
33    # add_library(dummy_library_pe_64 SHARED stub.cpp)
34    # add_custom_command(TARGET dummy_library_pe_64 POST_BUILD
35    #     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_pe_64> ${CMAKE_CURRENT_SOURCE_DIR}/binaries
36    #     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_pe_64> ${CMAKE_CURRENT_SOURCE_DIR}/binaries/dummy_library_pe_64.so)
37
38    ### Copy the 32-bit PE file into the binaries folder for later use.
39    ### Also, copy the 32-bit PE-but call it a SO so that we can use the wrong target (ELF vs. PE) on Linux
40    #
41    ### NOTE: Uncomment the following to rebuild the targets
42    #
43    # add_library(dummy_library_pe_32 SHARED stub.cpp)
44    # add_custom_command(TARGET dummy_library_pe_32 POST_BUILD
45    #     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_pe_32> ${CMAKE_CURRENT_SOURCE_DIR}/binaries
46    #     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dummy_library_pe_32> ${CMAKE_CURRENT_SOURCE_DIR}/binaries/dummy_library_pe_32.so)
47endif()
48