--- ray/src/cv/CMakeLists.txt 2016/07/27 18:05:53 1.10 +++ ray/src/cv/CMakeLists.txt 2021/12/14 02:33:18 1.20 @@ -15,6 +15,9 @@ target_link_libraries(tmesh2rad rtrad) add_executable(obj2rad obj2rad.c trans.c) target_link_libraries(obj2rad rtrad) +add_executable(robjutil robjutil.c) +target_link_libraries(robjutil wfobj rtrad) + add_executable(mgf2rad mgf2rad.c) target_link_libraries(mgf2rad mgf rtrad) @@ -25,32 +28,28 @@ add_executable(mgfilt mgfilt.c) target_link_libraries(mgfilt mgf rtrad) add_executable(mgf2inv mgf2inv.c) -target_link_libraries(mgf2inv mgf rtrad) +target_link_libraries(mgf2inv mgf rtrad) add_executable(3ds2mgf 3ds2mgf.c rayopt3ds.c vect3ds.c) -target_link_libraries(3ds2mgf rtrad) +target_link_libraries(3ds2mgf rtrad) -if (NOT WIN32) - +if(BUILD_PABOPTO_UTILS) add_executable(pabopto2bsdf pabopto2bsdf.c bsdfrep.c bsdfrbf.c bsdfmesh.c bsdftrans.cpp) - target_link_libraries(pabopto2bsdf rtrad) + target_link_libraries(pabopto2bsdf rtrad) - add_executable(pabopto2xyz pabopto2xyz.c) - target_link_libraries(pabopto2xyz rtrad) + #add_executable(pabopto2xyz pabopto2xyz.c) + #target_link_libraries(pabopto2xyz rtrad) - add_executable(pabopto2rad pabopto2bsdf.c bsdfrep.c bsdfrbf.c bsdfmesh.c bsdftrans.cpp) + add_executable(pabopto2rad pabopto2bsdf.c bsdfrep.c bsdfrbf.c bsdfmesh.c bsdftrans.cpp) target_link_libraries(pabopto2rad rtrad) set_target_properties(pabopto2rad PROPERTIES COMPILE_DEFINITIONS TEST_MAIN) - endif() -add_executable(bsdf2rad bsdf2rad.c bsdfrep.c bsdfinterp.c) +add_executable(bsdf2rad bsdf2rad.c bsdfrep.c bsdfinterp.c) target_link_libraries(bsdf2rad rtrad) -if(BUILD_TESTING) - add_executable(bsdfquery bsdfquery.c bsdfrep.c bsdfinterp.c) - target_link_libraries(bsdfquery rtrad) -endif() +add_executable(bsdfquery bsdfquery.c bsdfrep.c bsdfinterp.c) +target_link_libraries(bsdfquery rtrad) add_executable(bsdf2ttree bsdf2ttree.c bsdfrep.c bsdfinterp.c) target_link_libraries(bsdf2ttree rtrad) @@ -61,22 +60,62 @@ target_link_libraries(bsdf2klems rtrad) add_executable(pkgBSDF pkgBSDF.c trans.c) target_link_libraries(pkgBSDF rtrad) +add_executable(checkBSDF checkBSDF.c) +target_link_libraries(checkBSDF rtrad) + add_executable(epw2wea epw2wea.c) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../meta) add_executable(mgf2meta mgf2meta.c) target_link_libraries(mgf2meta mgf meta rtrad) -install(TARGETS - ies2rad nff2rad lampcolor tmesh2rad obj2rad - mgf2rad rad2mgf mgf2meta mgfilt mgf2inv 3ds2mgf - bsdf2ttree bsdf2klems pkgBSDF epw2wea - RUNTIME DESTINATION bin) +install(TARGETS + 3ds2mgf + bsdf2klems + bsdf2rad + bsdf2ttree + checkBSDF + epw2wea + ies2rad + lampcolor + mgf2inv + mgf2meta + mgf2rad + mgfilt + nff2rad + obj2rad + pkgBSDF + rad2mgf + robjutil + tmesh2rad + RUNTIME DESTINATION "bin" +) -INSTALL(FILES source.cal tilt.cal lamp.tab window.cal - DESTINATION lib) +file(COPY + bsdf2rad.cal + lamp.tab + source.cal + tilt.cal + window.cal + DESTINATION "${CMAKE_BINARY_DIR}/lib" +) -if (NOT WIN32) - INSTALL(PROGRAMS optics2rad.csh DESTINATION bin RENAME optics2rad) - INSTALL(TARGETS pabopto2rad pabopto2bsdf DESTINATION bin) +if(WIN32) + add_custom_target(optics2rad ALL + COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/optics2rad.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/optics2rad.exe -d + ) + install(PROGRAMS optics2rad.exe + DESTINATION "bin" + ) +else() + install(PROGRAMS optics2rad.pl + DESTINATION "bin" + RENAME optics2rad + ) +endif() + +if(BUILD_PABOPTO_UTILS) + install(TARGETS pabopto2bsdf pabopto2rad + DESTINATION "bin" + ) endif()