--- ray/src/gen/CMakeLists.txt 2013/01/18 19:56:02 2.3 +++ ray/src/gen/CMakeLists.txt 2025/04/10 23:30:58 2.16 @@ -1,27 +1,39 @@ +# Locate the threads package +set(CMAKE_THREAD_PREFER_PTHREAD TRUE) +set(THREADS_PREFER_PTHREAD_FLAG TRUE) +find_package(Threads REQUIRED) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../rt) add_executable(genbeads genbeads.c hermite3.c) target_link_libraries(genbeads ${LIB_M}) add_executable(genbox genbox.c) +target_link_libraries(genbox wfobj rtrad ${LIB_M}) add_executable(genmarble genmarble.c ../common/random.h) target_link_libraries(genmarble ${LIB_M}) add_executable(gensky gensky.c sun.c) -target_link_libraries(gensky ${LIB_M}) +target_link_libraries(gensky rtrad ${LIB_M}) +add_executable(genssky genssky.c sun.c atmos.c) +target_link_libraries(genssky rtrad ${LIB_M} Threads::Threads) + +add_executable(gensdaymtx gensdaymtx.c sun.c atmos.c loadEPW.c) +target_link_libraries(gensdaymtx rtrad ${LIB_M} Threads::Threads) + add_executable(gendaylit gendaylit.c sun.c) target_link_libraries(gendaylit rtrad ${LIB_M}) -add_executable(gendaymtx gendaymtx.c sun.c) +add_executable(gendaymtx gendaymtx.c sun.c loadEPW.c) target_link_libraries(gendaymtx rtrad ${LIB_M}) add_executable(genblinds genblinds.c) -target_link_libraries(genblinds ${LIB_M}) +target_link_libraries(genblinds rtrad ${LIB_M}) add_executable(genprism genprism.c) -target_link_libraries(genprism ${LIB_M}) +target_link_libraries(genprism rtrad ${LIB_M}) add_executable(xform xform.c) target_link_libraries(xform rtrad) @@ -35,7 +47,7 @@ target_link_libraries(mkillum raycalls radiance rtrad) add_executable(mksource mksource.c) target_link_libraries(mksource raycalls radiance rtrad) -add_executable(genrev genrev.c ) +add_executable(genrev genrev.c) target_link_libraries(genrev rtrad) add_executable(gencatenary gencat.c) @@ -53,14 +65,43 @@ target_link_libraries(genclock ${LIB_M}) add_executable(genbranch genbranch.c) target_link_libraries(genbranch ${LIB_M}) -install(TARGETS genbox gensky xform genblinds genrev genworm gendaylit gensurf - genprism replmarks mkillum mksource genclock gendaymtx - DESTINATION bin) +install(TARGETS + genblinds + genbox + genclock + gendaylit + gendaymtx + gensdaymtx + genprism + genrev + gensky + genssky + gensurf + genworm + mkillum + mksource + replmarks + xform + DESTINATION "bin" +) -install(FILES illum.cal rev.cal skybright.cal surf.cal clockface.hex glaze1.cal - glaze2.cal perezlum.cal coeff_perez.dat defangle.dat - DESTINATION lib) +file(COPY + clockface.hex + glaze1.cal + glaze2.cal + illum.cal + perezlum.cal + perezlum_c.cal + rev.cal + skybright.cal + surf.cal + mie_ca.dat + DESTINATION "${CMAKE_BINARY_DIR}/lib" +) -if (NOT WIN32) - install(PROGRAMS glaze.csh DESTINATION bin RENAME glaze) -endif() \ No newline at end of file +if(NOT WIN32) + install(PROGRAMS glaze.csh + DESTINATION "bin" + RENAME glaze + ) +endif()